From febe8b348b0ee551252da2ca561c8afc1bc772ee Mon Sep 17 00:00:00 2001 From: David Fugate <dfugate@microsoft.com> Date: Mon, 27 Jun 2011 16:20:31 -0700 Subject: [PATCH] Ported Sputnik changes over from the 'external' directory to 'test/suite/sputnik'. Still need to convert the tests over to test262 format. --- .../S7.5.3_A1.1.js | 23 ++- .../S7.5.3_A1.12.js | 23 ++- .../S7.5.3_A1.13.js | 23 ++- .../S7.5.3_A1.14.js | 23 ++- .../S7.5.3_A1.15.js | 27 +-- .../S7.5.3_A1.15ns.js | 13 ++ .../S7.5.3_A1.17.js | 23 ++- .../S7.5.3_A1.18.js | 27 +-- .../S7.5.3_A1.18ns.js | 13 ++ .../S7.5.3_A1.19.js | 23 ++- .../S7.5.3_A1.2.js | 23 ++- .../S7.5.3_A1.20.js | 23 ++- .../S7.5.3_A1.21.js | 26 +-- .../S7.5.3_A1.21ns.js | 13 ++ .../S7.5.3_A1.22.js | 26 +-- .../S7.5.3_A1.22ns.js | 13 ++ .../S7.5.3_A1.23.js | 27 +-- .../S7.5.3_A1.23ns.js | 13 ++ .../S7.5.3_A1.24.js | 26 +-- .../S7.5.3_A1.24ns.js | 13 ++ .../S7.5.3_A1.25.js | 23 ++- .../S7.5.3_A1.26.js | 26 +-- .../S7.5.3_A1.26ns.js | 13 ++ .../S7.5.3_A1.28.js | 23 ++- .../S7.5.3_A1.29.js | 23 ++- .../S7.5.3_A1.3.js | 23 ++- .../S7.5.3_A1.30.js | 23 ++- .../S7.5.3_A1.31.js | 23 ++- .../S7.5.3_A1.4.js | 23 ++- .../S7.5.3_A1.8.js | 23 ++- .../S7.8.5_A3.1_T7.js | 35 ++-- .../S7.8.5_A3.1_T8.js | 36 ++-- .../S7.8.5_A3.1_T9.js | 35 ++-- .../S12.10_A3.3_T4.js | 116 ++++++------- .../12.14_The_try_Statement/S12.14_A14.js | 155 +++++++++--------- .../12.14_The_try_Statement/S12.14_A4.js | 71 ++++---- .../12_Statement/12.1_Block/S12.1_A1.js | 31 ++-- .../12.5_The_if_Statement/S12.5_A7.js | 50 +++--- .../12.5_The_if_Statement/S12.5_A9_T1.js | 36 ++-- .../12.5_The_if_Statement/S12.5_A9_T2.js | 43 ++--- .../S12.6.1_A1.js | 80 ++++----- .../S12.6.1_A13_T1.js | 32 ++-- .../S12.6.1_A13_T2.js | 38 +++-- .../S15.10.6.2_A12.js | 18 ++ .../15.12.2_JSON.parse/S15.12.2_A1.js | 19 +++ .../S15.2.4.2_A12.js | 12 ++ .../S15.2.4.2_A13.js | 12 ++ .../S15.2.4.2_A14.js | 14 ++ .../S15.2.4.2_A15.js | 14 ++ .../S15.2.4.2_A16.js | 14 ++ .../S15.2.4.3_A12.js | 12 ++ .../S15.2.4.3_A13.js | 12 ++ .../S15.2.4.4_A12.js | 12 ++ .../S15.2.4.4_A13.js | 12 ++ .../S15.2.4.4_A14.js | 12 ++ .../S15.2.4.5_A12.js | 12 ++ .../S15.2.4.5_A13.js | 12 ++ .../S15.2.4.6_A12.js | 12 ++ .../S15.2.4.6_A13.js | 12 ++ .../S15.2.4.7_A12.js | 12 ++ .../S15.2.4.7_A13.js | 12 ++ .../S15.3.4.2_A10.js | 46 +++--- .../S15.3.4.2_A12.js | 13 ++ .../S15.3.4.2_A13.js | 13 ++ .../S15.3.4.2_A14.js | 13 ++ .../S15.3.4.2_A15.js | 16 ++ .../S15.3.4.2_A16.js | 18 ++ .../S15.3.4.2_A1_T1.js | 36 ++-- .../S15.3.4.3_A13.js | 11 ++ .../S15.3.4.3_A14.js | 11 ++ .../S15.3.4.3_A15.js | 11 ++ .../S15.3.4.3_A16.js | 27 +++ .../S15.3.4.4_A13.js | 11 ++ .../S15.3.4.4_A14.js | 11 ++ .../S15.3.4.4_A15.js | 11 ++ .../S15.3.4.4_A16.js | 27 +++ .../S15.3.4.5_A1.js | 15 ++ .../S15.3.4.5_A13.js | 12 ++ .../S15.3.4.5_A14.js | 12 ++ .../S15.3.4.5_A15.js | 12 ++ .../S15.3.4.5_A16.js | 27 +++ .../S15.3.4.5_A2.js | 16 ++ .../S15.3.4_A1.js | 32 ++-- .../S15.3.4_A3_T1.js | 38 ++--- .../S15.3.5.1_A1_T1.js | 44 ++--- .../S15.3.5_A1_T1.js | 35 ++-- .../S15.3.5_A1_T2.js | 36 ++-- .../S15.4.4.11_A8.js | 24 +++ .../S15.4.4.18_A1.js | 11 ++ .../S15.4.4.18_A2.js | 14 ++ .../S15.4.4_A1.1_T2.js | 32 ++-- .../S15.5.4.11_A12.js | 23 +++ .../S15.5.4.8_A1_T1.js | 45 +++-- 93 files changed, 1508 insertions(+), 832 deletions(-) create mode 100644 test/suite/sputnik/Conformance/07_Lexical_Conventions/7.5_Tokens/7.5.3_Future_Reserved_Words/S7.5.3_A1.15ns.js create mode 100644 test/suite/sputnik/Conformance/07_Lexical_Conventions/7.5_Tokens/7.5.3_Future_Reserved_Words/S7.5.3_A1.18ns.js create mode 100644 test/suite/sputnik/Conformance/07_Lexical_Conventions/7.5_Tokens/7.5.3_Future_Reserved_Words/S7.5.3_A1.21ns.js create mode 100644 test/suite/sputnik/Conformance/07_Lexical_Conventions/7.5_Tokens/7.5.3_Future_Reserved_Words/S7.5.3_A1.22ns.js create mode 100644 test/suite/sputnik/Conformance/07_Lexical_Conventions/7.5_Tokens/7.5.3_Future_Reserved_Words/S7.5.3_A1.23ns.js create mode 100644 test/suite/sputnik/Conformance/07_Lexical_Conventions/7.5_Tokens/7.5.3_Future_Reserved_Words/S7.5.3_A1.24ns.js create mode 100644 test/suite/sputnik/Conformance/07_Lexical_Conventions/7.5_Tokens/7.5.3_Future_Reserved_Words/S7.5.3_A1.26ns.js create mode 100644 test/suite/sputnik/Conformance/15_Native/15.10_RegExp_Objects/15.10.6_Properties_of_the_RegExp_Prototype_Object/15.10.6.2_RegExp.prototype.exec/S15.10.6.2_A12.js create mode 100644 test/suite/sputnik/Conformance/15_Native/15.12_The_JSON_Object/15.12.2_JSON.parse/S15.12.2_A1.js create mode 100644 test/suite/sputnik/Conformance/15_Native/15.2_Object_Objects/15.2.4_Properties_of_the_Object_Prototype_Object/15.2.4.2_Object.prototype.toString/S15.2.4.2_A12.js create mode 100644 test/suite/sputnik/Conformance/15_Native/15.2_Object_Objects/15.2.4_Properties_of_the_Object_Prototype_Object/15.2.4.2_Object.prototype.toString/S15.2.4.2_A13.js create mode 100644 test/suite/sputnik/Conformance/15_Native/15.2_Object_Objects/15.2.4_Properties_of_the_Object_Prototype_Object/15.2.4.2_Object.prototype.toString/S15.2.4.2_A14.js create mode 100644 test/suite/sputnik/Conformance/15_Native/15.2_Object_Objects/15.2.4_Properties_of_the_Object_Prototype_Object/15.2.4.2_Object.prototype.toString/S15.2.4.2_A15.js create mode 100644 test/suite/sputnik/Conformance/15_Native/15.2_Object_Objects/15.2.4_Properties_of_the_Object_Prototype_Object/15.2.4.2_Object.prototype.toString/S15.2.4.2_A16.js create mode 100644 test/suite/sputnik/Conformance/15_Native/15.2_Object_Objects/15.2.4_Properties_of_the_Object_Prototype_Object/15.2.4.3_Object.prototype.toLocaleString/S15.2.4.3_A12.js create mode 100644 test/suite/sputnik/Conformance/15_Native/15.2_Object_Objects/15.2.4_Properties_of_the_Object_Prototype_Object/15.2.4.3_Object.prototype.toLocaleString/S15.2.4.3_A13.js create mode 100644 test/suite/sputnik/Conformance/15_Native/15.2_Object_Objects/15.2.4_Properties_of_the_Object_Prototype_Object/15.2.4.4_Object.prototype.valueOf/S15.2.4.4_A12.js create mode 100644 test/suite/sputnik/Conformance/15_Native/15.2_Object_Objects/15.2.4_Properties_of_the_Object_Prototype_Object/15.2.4.4_Object.prototype.valueOf/S15.2.4.4_A13.js create mode 100644 test/suite/sputnik/Conformance/15_Native/15.2_Object_Objects/15.2.4_Properties_of_the_Object_Prototype_Object/15.2.4.4_Object.prototype.valueOf/S15.2.4.4_A14.js create mode 100644 test/suite/sputnik/Conformance/15_Native/15.2_Object_Objects/15.2.4_Properties_of_the_Object_Prototype_Object/15.2.4.5_Object.prototype.hasOwnProperty/S15.2.4.5_A12.js create mode 100644 test/suite/sputnik/Conformance/15_Native/15.2_Object_Objects/15.2.4_Properties_of_the_Object_Prototype_Object/15.2.4.5_Object.prototype.hasOwnProperty/S15.2.4.5_A13.js create mode 100644 test/suite/sputnik/Conformance/15_Native/15.2_Object_Objects/15.2.4_Properties_of_the_Object_Prototype_Object/15.2.4.6_Object.prototype.isPrototypeOf/S15.2.4.6_A12.js create mode 100644 test/suite/sputnik/Conformance/15_Native/15.2_Object_Objects/15.2.4_Properties_of_the_Object_Prototype_Object/15.2.4.6_Object.prototype.isPrototypeOf/S15.2.4.6_A13.js create mode 100644 test/suite/sputnik/Conformance/15_Native/15.2_Object_Objects/15.2.4_Properties_of_the_Object_Prototype_Object/15.2.4.7_Object.prototype.propertyIsEnumerable/S15.2.4.7_A12.js create mode 100644 test/suite/sputnik/Conformance/15_Native/15.2_Object_Objects/15.2.4_Properties_of_the_Object_Prototype_Object/15.2.4.7_Object.prototype.propertyIsEnumerable/S15.2.4.7_A13.js create mode 100644 test/suite/sputnik/Conformance/15_Native/15.3_Function_Objects/15.3.4_Properties_of_the_Function_Prototype_Object/15.3.4.2_Function.prototype.toString/S15.3.4.2_A12.js create mode 100644 test/suite/sputnik/Conformance/15_Native/15.3_Function_Objects/15.3.4_Properties_of_the_Function_Prototype_Object/15.3.4.2_Function.prototype.toString/S15.3.4.2_A13.js create mode 100644 test/suite/sputnik/Conformance/15_Native/15.3_Function_Objects/15.3.4_Properties_of_the_Function_Prototype_Object/15.3.4.2_Function.prototype.toString/S15.3.4.2_A14.js create mode 100644 test/suite/sputnik/Conformance/15_Native/15.3_Function_Objects/15.3.4_Properties_of_the_Function_Prototype_Object/15.3.4.2_Function.prototype.toString/S15.3.4.2_A15.js create mode 100644 test/suite/sputnik/Conformance/15_Native/15.3_Function_Objects/15.3.4_Properties_of_the_Function_Prototype_Object/15.3.4.2_Function.prototype.toString/S15.3.4.2_A16.js create mode 100644 test/suite/sputnik/Conformance/15_Native/15.3_Function_Objects/15.3.4_Properties_of_the_Function_Prototype_Object/15.3.4.3_Function.prototype.apply/S15.3.4.3_A13.js create mode 100644 test/suite/sputnik/Conformance/15_Native/15.3_Function_Objects/15.3.4_Properties_of_the_Function_Prototype_Object/15.3.4.3_Function.prototype.apply/S15.3.4.3_A14.js create mode 100644 test/suite/sputnik/Conformance/15_Native/15.3_Function_Objects/15.3.4_Properties_of_the_Function_Prototype_Object/15.3.4.3_Function.prototype.apply/S15.3.4.3_A15.js create mode 100644 test/suite/sputnik/Conformance/15_Native/15.3_Function_Objects/15.3.4_Properties_of_the_Function_Prototype_Object/15.3.4.3_Function.prototype.apply/S15.3.4.3_A16.js create mode 100644 test/suite/sputnik/Conformance/15_Native/15.3_Function_Objects/15.3.4_Properties_of_the_Function_Prototype_Object/15.3.4.4_Function.prototype.call/S15.3.4.4_A13.js create mode 100644 test/suite/sputnik/Conformance/15_Native/15.3_Function_Objects/15.3.4_Properties_of_the_Function_Prototype_Object/15.3.4.4_Function.prototype.call/S15.3.4.4_A14.js create mode 100644 test/suite/sputnik/Conformance/15_Native/15.3_Function_Objects/15.3.4_Properties_of_the_Function_Prototype_Object/15.3.4.4_Function.prototype.call/S15.3.4.4_A15.js create mode 100644 test/suite/sputnik/Conformance/15_Native/15.3_Function_Objects/15.3.4_Properties_of_the_Function_Prototype_Object/15.3.4.4_Function.prototype.call/S15.3.4.4_A16.js create mode 100644 test/suite/sputnik/Conformance/15_Native/15.3_Function_Objects/15.3.4_Properties_of_the_Function_Prototype_Object/15.3.4.5_Function.prototype.bind/S15.3.4.5_A1.js create mode 100644 test/suite/sputnik/Conformance/15_Native/15.3_Function_Objects/15.3.4_Properties_of_the_Function_Prototype_Object/15.3.4.5_Function.prototype.bind/S15.3.4.5_A13.js create mode 100644 test/suite/sputnik/Conformance/15_Native/15.3_Function_Objects/15.3.4_Properties_of_the_Function_Prototype_Object/15.3.4.5_Function.prototype.bind/S15.3.4.5_A14.js create mode 100644 test/suite/sputnik/Conformance/15_Native/15.3_Function_Objects/15.3.4_Properties_of_the_Function_Prototype_Object/15.3.4.5_Function.prototype.bind/S15.3.4.5_A15.js create mode 100644 test/suite/sputnik/Conformance/15_Native/15.3_Function_Objects/15.3.4_Properties_of_the_Function_Prototype_Object/15.3.4.5_Function.prototype.bind/S15.3.4.5_A16.js create mode 100644 test/suite/sputnik/Conformance/15_Native/15.3_Function_Objects/15.3.4_Properties_of_the_Function_Prototype_Object/15.3.4.5_Function.prototype.bind/S15.3.4.5_A2.js create mode 100644 test/suite/sputnik/Conformance/15_Native/15.4_Array_Objects/15.4.4_Properties_of_the_Array_Prototype_Object/15.4.4.11_Array_prototype_sort/S15.4.4.11_A8.js create mode 100644 test/suite/sputnik/Conformance/15_Native/15.4_Array_Objects/15.4.4_Properties_of_the_Array_Prototype_Object/15.4.4.18_Array_prototype_forEach/S15.4.4.18_A1.js create mode 100644 test/suite/sputnik/Conformance/15_Native/15.4_Array_Objects/15.4.4_Properties_of_the_Array_Prototype_Object/15.4.4.18_Array_prototype_forEach/S15.4.4.18_A2.js create mode 100644 test/suite/sputnik/Conformance/15_Native/15.5_String_Objects/15.5.4_Properties_of_the_String_Prototype_Object/15.5.4.11_String.prototype.replace/S15.5.4.11_A12.js diff --git a/test/suite/sputnik/Conformance/07_Lexical_Conventions/7.5_Tokens/7.5.3_Future_Reserved_Words/S7.5.3_A1.1.js b/test/suite/sputnik/Conformance/07_Lexical_Conventions/7.5_Tokens/7.5.3_Future_Reserved_Words/S7.5.3_A1.1.js index 67bf80508c..d37ca0f535 100644 --- a/test/suite/sputnik/Conformance/07_Lexical_Conventions/7.5_Tokens/7.5.3_Future_Reserved_Words/S7.5.3_A1.1.js +++ b/test/suite/sputnik/Conformance/07_Lexical_Conventions/7.5_Tokens/7.5.3_Future_Reserved_Words/S7.5.3_A1.1.js @@ -1,12 +1,11 @@ -// Copyright 2009 the Sputnik authors. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/** - * @name: S7.5.3_A1.1; - * @section: 7.5.3; - * @assertion: The "abstract" token can not be used as identifier; - * @description: Checking if execution of "abstract=1" fails; - * @negative -*/ - -abstract = 1; +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * @name: S7.5.3_A1.1; + * @section: 7.5.3; + * @assertion: The "abstract" token can be used as identifier; + * @description: Checking if execution of "abstract=1" succeeds; + */ + +abstract = 1; diff --git a/test/suite/sputnik/Conformance/07_Lexical_Conventions/7.5_Tokens/7.5.3_Future_Reserved_Words/S7.5.3_A1.12.js b/test/suite/sputnik/Conformance/07_Lexical_Conventions/7.5_Tokens/7.5.3_Future_Reserved_Words/S7.5.3_A1.12.js index 8189b2ed5b..2fbba1c645 100644 --- a/test/suite/sputnik/Conformance/07_Lexical_Conventions/7.5_Tokens/7.5.3_Future_Reserved_Words/S7.5.3_A1.12.js +++ b/test/suite/sputnik/Conformance/07_Lexical_Conventions/7.5_Tokens/7.5.3_Future_Reserved_Words/S7.5.3_A1.12.js @@ -1,12 +1,11 @@ -// Copyright 2009 the Sputnik authors. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/** - * @name: S7.5.3_A1.12; - * @section: 7.5.3; - * @assertion: The "final" token can not be used as identifier; - * @description: Checking if execution of "final=1" fails; - * @negative -*/ - -final = 1; +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * @name: S7.5.3_A1.12; + * @section: 7.5.3; + * @assertion: The "final" token can be used as identifier; + * @description: Checking if execution of "final=1" succeeds; + */ + +final = 1; diff --git a/test/suite/sputnik/Conformance/07_Lexical_Conventions/7.5_Tokens/7.5.3_Future_Reserved_Words/S7.5.3_A1.13.js b/test/suite/sputnik/Conformance/07_Lexical_Conventions/7.5_Tokens/7.5.3_Future_Reserved_Words/S7.5.3_A1.13.js index 783788d72f..9e436929a0 100644 --- a/test/suite/sputnik/Conformance/07_Lexical_Conventions/7.5_Tokens/7.5.3_Future_Reserved_Words/S7.5.3_A1.13.js +++ b/test/suite/sputnik/Conformance/07_Lexical_Conventions/7.5_Tokens/7.5.3_Future_Reserved_Words/S7.5.3_A1.13.js @@ -1,12 +1,11 @@ -// Copyright 2009 the Sputnik authors. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/** - * @name: S7.5.3_A1.13; - * @section: 7.5.3; - * @assertion: The "float" token can not be used as identifier; - * @description: Checking if execution of "float=1" fails; - * @negative -*/ - -float = 1; +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * @name: S7.5.3_A1.13; + * @section: 7.5.3; + * @assertion: The "float" token can be used as identifier; + * @description: Checking if execution of "float=1" succeeds; +*/ + +float = 1; diff --git a/test/suite/sputnik/Conformance/07_Lexical_Conventions/7.5_Tokens/7.5.3_Future_Reserved_Words/S7.5.3_A1.14.js b/test/suite/sputnik/Conformance/07_Lexical_Conventions/7.5_Tokens/7.5.3_Future_Reserved_Words/S7.5.3_A1.14.js index 1163ee4779..6399276b5f 100644 --- a/test/suite/sputnik/Conformance/07_Lexical_Conventions/7.5_Tokens/7.5.3_Future_Reserved_Words/S7.5.3_A1.14.js +++ b/test/suite/sputnik/Conformance/07_Lexical_Conventions/7.5_Tokens/7.5.3_Future_Reserved_Words/S7.5.3_A1.14.js @@ -1,12 +1,11 @@ -// Copyright 2009 the Sputnik authors. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/** - * @name: S7.5.3_A1.14; - * @section: 7.5.3; - * @assertion: The "goto" token can not be used as identifier; - * @description: Checking if execution of "goto=1" fails; - * @negative -*/ - -goto = 1; +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * @name: S7.5.3_A1.14; + * @section: 7.5.3; + * @assertion: The "goto" token can be used as identifier; + * @description: Checking if execution of "goto=1" succeeds; + */ + +goto = 1; diff --git a/test/suite/sputnik/Conformance/07_Lexical_Conventions/7.5_Tokens/7.5.3_Future_Reserved_Words/S7.5.3_A1.15.js b/test/suite/sputnik/Conformance/07_Lexical_Conventions/7.5_Tokens/7.5.3_Future_Reserved_Words/S7.5.3_A1.15.js index 2a00baa244..be59187b7d 100644 --- a/test/suite/sputnik/Conformance/07_Lexical_Conventions/7.5_Tokens/7.5.3_Future_Reserved_Words/S7.5.3_A1.15.js +++ b/test/suite/sputnik/Conformance/07_Lexical_Conventions/7.5_Tokens/7.5.3_Future_Reserved_Words/S7.5.3_A1.15.js @@ -1,12 +1,15 @@ -// Copyright 2009 the Sputnik authors. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/** - * @name: S7.5.3_A1.15; - * @section: 7.5.3; - * @assertion: The "implements" token can not be used as identifier; - * @description: Checking if execution of "implements=1" fails; - * @negative -*/ - -implements = 1; +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * @name: S7.5.3_A1.15; + * @section: 7.5.3; + * @assertion: The "implements" token can not be used as identifier in + * strict code; + * @description: Checking if execution of "implements=1" fails in + * strict code; + * @negative + */ + +"use strict"; +implements = 1; \ No newline at end of file diff --git a/test/suite/sputnik/Conformance/07_Lexical_Conventions/7.5_Tokens/7.5.3_Future_Reserved_Words/S7.5.3_A1.15ns.js b/test/suite/sputnik/Conformance/07_Lexical_Conventions/7.5_Tokens/7.5.3_Future_Reserved_Words/S7.5.3_A1.15ns.js new file mode 100644 index 0000000000..939f3fbf12 --- /dev/null +++ b/test/suite/sputnik/Conformance/07_Lexical_Conventions/7.5_Tokens/7.5.3_Future_Reserved_Words/S7.5.3_A1.15ns.js @@ -0,0 +1,13 @@ +// Copyright 2011 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * @name: S7.5.3_A1.15; + * @section: 7.5.3; + * @assertion: The "implements" token can be used as identifier in + * non-strict code; + * @description: Checking if execution of "implements=1" succeeds in + * non-strict code; + */ + +new Function('implements = 1'); \ No newline at end of file diff --git a/test/suite/sputnik/Conformance/07_Lexical_Conventions/7.5_Tokens/7.5.3_Future_Reserved_Words/S7.5.3_A1.17.js b/test/suite/sputnik/Conformance/07_Lexical_Conventions/7.5_Tokens/7.5.3_Future_Reserved_Words/S7.5.3_A1.17.js index 99bee2c0a7..5e7e72bdea 100644 --- a/test/suite/sputnik/Conformance/07_Lexical_Conventions/7.5_Tokens/7.5.3_Future_Reserved_Words/S7.5.3_A1.17.js +++ b/test/suite/sputnik/Conformance/07_Lexical_Conventions/7.5_Tokens/7.5.3_Future_Reserved_Words/S7.5.3_A1.17.js @@ -1,12 +1,11 @@ -// Copyright 2009 the Sputnik authors. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/** - * @name: S7.5.3_A1.17; - * @section: 7.5.3; - * @assertion: The "int" token can not be used as identifier; - * @description: Checking if execution of "int=1" fails; - * @negative -*/ - -int = 1; +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * @name: S7.5.3_A1.17; + * @section: 7.5.3; + * @assertion: The "int" token can be used as identifier; + * @description: Checking if execution of "int=1" succeeds; +*/ + +int = 1; diff --git a/test/suite/sputnik/Conformance/07_Lexical_Conventions/7.5_Tokens/7.5.3_Future_Reserved_Words/S7.5.3_A1.18.js b/test/suite/sputnik/Conformance/07_Lexical_Conventions/7.5_Tokens/7.5.3_Future_Reserved_Words/S7.5.3_A1.18.js index a490cebc57..1ce3a1b13c 100644 --- a/test/suite/sputnik/Conformance/07_Lexical_Conventions/7.5_Tokens/7.5.3_Future_Reserved_Words/S7.5.3_A1.18.js +++ b/test/suite/sputnik/Conformance/07_Lexical_Conventions/7.5_Tokens/7.5.3_Future_Reserved_Words/S7.5.3_A1.18.js @@ -1,12 +1,15 @@ -// Copyright 2009 the Sputnik authors. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/** - * @name: S7.5.3_A1.18; - * @section: 7.5.3; - * @assertion: The "interface" token can not be used as identifier; - * @description: Checking if execution of "interface = 1" fails; - * @negative -*/ - -interface = 1; +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * @name: S7.5.3_A1.18; + * @section: 7.5.3; + * @assertion: The "interface" token can not be used as identifier in + * strict code; + * @description: Checking if execution of "interface = 1" fails in + * strict code; + * @negative + */ + +"use strict"; +interface = 1; diff --git a/test/suite/sputnik/Conformance/07_Lexical_Conventions/7.5_Tokens/7.5.3_Future_Reserved_Words/S7.5.3_A1.18ns.js b/test/suite/sputnik/Conformance/07_Lexical_Conventions/7.5_Tokens/7.5.3_Future_Reserved_Words/S7.5.3_A1.18ns.js new file mode 100644 index 0000000000..787e656467 --- /dev/null +++ b/test/suite/sputnik/Conformance/07_Lexical_Conventions/7.5_Tokens/7.5.3_Future_Reserved_Words/S7.5.3_A1.18ns.js @@ -0,0 +1,13 @@ +// Copyright 2011 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * @name: S7.5.3_A1.18; + * @section: 7.5.3; + * @assertion: The "interface" token can be used as identifier in + * non-strict code; + * @description: Checking if execution of "interface = 1" succeeds in + * strict code; + */ + +new Function('interface = 1'); diff --git a/test/suite/sputnik/Conformance/07_Lexical_Conventions/7.5_Tokens/7.5.3_Future_Reserved_Words/S7.5.3_A1.19.js b/test/suite/sputnik/Conformance/07_Lexical_Conventions/7.5_Tokens/7.5.3_Future_Reserved_Words/S7.5.3_A1.19.js index 68581ac45c..1667d3905c 100644 --- a/test/suite/sputnik/Conformance/07_Lexical_Conventions/7.5_Tokens/7.5.3_Future_Reserved_Words/S7.5.3_A1.19.js +++ b/test/suite/sputnik/Conformance/07_Lexical_Conventions/7.5_Tokens/7.5.3_Future_Reserved_Words/S7.5.3_A1.19.js @@ -1,12 +1,11 @@ -// Copyright 2009 the Sputnik authors. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/** - * @name: S7.5.3_A1.19; - * @section: 7.5.3; - * @assertion: The "long" token can not be used as identifier; - * @description: Checking if execution of "long=1" fails; - * @negative -*/ - -long = 1; +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * @name: S7.5.3_A1.19; + * @section: 7.5.3; + * @assertion: The "long" token can be used as identifier; + * @description: Checking if execution of "long=1" succeeds; + */ + +long = 1; diff --git a/test/suite/sputnik/Conformance/07_Lexical_Conventions/7.5_Tokens/7.5.3_Future_Reserved_Words/S7.5.3_A1.2.js b/test/suite/sputnik/Conformance/07_Lexical_Conventions/7.5_Tokens/7.5.3_Future_Reserved_Words/S7.5.3_A1.2.js index 551cd9f61e..76c3c81c2c 100644 --- a/test/suite/sputnik/Conformance/07_Lexical_Conventions/7.5_Tokens/7.5.3_Future_Reserved_Words/S7.5.3_A1.2.js +++ b/test/suite/sputnik/Conformance/07_Lexical_Conventions/7.5_Tokens/7.5.3_Future_Reserved_Words/S7.5.3_A1.2.js @@ -1,12 +1,11 @@ -// Copyright 2009 the Sputnik authors. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/** - * @name: S7.5.3_A1.2; - * @section: 7.5.3; - * @assertion: The "boolean" token can not be used as identifier; - * @description: Checking if execution of "boolean=1" fails; - * @negative -*/ - -boolean = 1; +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * @name: S7.5.3_A1.2; + * @section: 7.5.3; + * @assertion: The "boolean" token can be used as identifier; + * @description: Checking if execution of "boolean=1" succeeds; + */ + +boolean = 1; diff --git a/test/suite/sputnik/Conformance/07_Lexical_Conventions/7.5_Tokens/7.5.3_Future_Reserved_Words/S7.5.3_A1.20.js b/test/suite/sputnik/Conformance/07_Lexical_Conventions/7.5_Tokens/7.5.3_Future_Reserved_Words/S7.5.3_A1.20.js index b116451cc2..979fff751e 100644 --- a/test/suite/sputnik/Conformance/07_Lexical_Conventions/7.5_Tokens/7.5.3_Future_Reserved_Words/S7.5.3_A1.20.js +++ b/test/suite/sputnik/Conformance/07_Lexical_Conventions/7.5_Tokens/7.5.3_Future_Reserved_Words/S7.5.3_A1.20.js @@ -1,12 +1,11 @@ -// Copyright 2009 the Sputnik authors. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/** - * @name: S7.5.3_A1.20; - * @section: 7.5.3; - * @assertion: The "native" token can not be used as identifier; - * @description: Checking if execution of "native=1" fails; - * @negative -*/ - -native = 1; +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * @name: S7.5.3_A1.20; + * @section: 7.5.3; + * @assertion: The "native" token can be used as identifier; + * @description: Checking if execution of "native=1" succeeds; + */ + +native = 1; diff --git a/test/suite/sputnik/Conformance/07_Lexical_Conventions/7.5_Tokens/7.5.3_Future_Reserved_Words/S7.5.3_A1.21.js b/test/suite/sputnik/Conformance/07_Lexical_Conventions/7.5_Tokens/7.5.3_Future_Reserved_Words/S7.5.3_A1.21.js index 289a066f76..05e0223eef 100644 --- a/test/suite/sputnik/Conformance/07_Lexical_Conventions/7.5_Tokens/7.5.3_Future_Reserved_Words/S7.5.3_A1.21.js +++ b/test/suite/sputnik/Conformance/07_Lexical_Conventions/7.5_Tokens/7.5.3_Future_Reserved_Words/S7.5.3_A1.21.js @@ -1,12 +1,14 @@ -// Copyright 2009 the Sputnik authors. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/** - * @name: S7.5.3_A1.21; - * @section: 7.5.3; - * @assertion: The "package" token can not be used as identifier; - * @description: Checking if execution of "package=1" fails; - * @negative -*/ - -package = 1; +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * @name: S7.5.3_A1.21; + * @section: 7.5.3; + * @assertion: The "package" token can not be used as identifier in + * strict code; + * @description: Checking if execution of "package=1" fails in strict code; + * @negative + */ + +"use strict"; +package = 1; diff --git a/test/suite/sputnik/Conformance/07_Lexical_Conventions/7.5_Tokens/7.5.3_Future_Reserved_Words/S7.5.3_A1.21ns.js b/test/suite/sputnik/Conformance/07_Lexical_Conventions/7.5_Tokens/7.5.3_Future_Reserved_Words/S7.5.3_A1.21ns.js new file mode 100644 index 0000000000..65cbd93632 --- /dev/null +++ b/test/suite/sputnik/Conformance/07_Lexical_Conventions/7.5_Tokens/7.5.3_Future_Reserved_Words/S7.5.3_A1.21ns.js @@ -0,0 +1,13 @@ +// Copyright 2011 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * @name: S7.5.3_A1.21; + * @section: 7.5.3; + * @assertion: The "package" token can be used as identifier in + * non-strict code; + * @description: Checking if execution of "package=1" succeeds in + * non-strict code; + */ + +new Function('package = 1'); diff --git a/test/suite/sputnik/Conformance/07_Lexical_Conventions/7.5_Tokens/7.5.3_Future_Reserved_Words/S7.5.3_A1.22.js b/test/suite/sputnik/Conformance/07_Lexical_Conventions/7.5_Tokens/7.5.3_Future_Reserved_Words/S7.5.3_A1.22.js index d5eced439b..96441b0b37 100644 --- a/test/suite/sputnik/Conformance/07_Lexical_Conventions/7.5_Tokens/7.5.3_Future_Reserved_Words/S7.5.3_A1.22.js +++ b/test/suite/sputnik/Conformance/07_Lexical_Conventions/7.5_Tokens/7.5.3_Future_Reserved_Words/S7.5.3_A1.22.js @@ -1,12 +1,14 @@ -// Copyright 2009 the Sputnik authors. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/** - * @name: S7.5.3_A1.22; - * @section: 7.5.3; - * @assertion: The "private" token can not be used as identifier; - * @description: Checking if execution of "private=1" fails; - * @negative -*/ - -private = 1; +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * @name: S7.5.3_A1.22; + * @section: 7.5.3; + * @assertion: The "private" token can not be used as identifier in + * strict code; + * @description: Checking if execution of "private=1" fails in strict code; + * @negative + */ + +"use strict"; +private = 1; diff --git a/test/suite/sputnik/Conformance/07_Lexical_Conventions/7.5_Tokens/7.5.3_Future_Reserved_Words/S7.5.3_A1.22ns.js b/test/suite/sputnik/Conformance/07_Lexical_Conventions/7.5_Tokens/7.5.3_Future_Reserved_Words/S7.5.3_A1.22ns.js new file mode 100644 index 0000000000..e8b1040def --- /dev/null +++ b/test/suite/sputnik/Conformance/07_Lexical_Conventions/7.5_Tokens/7.5.3_Future_Reserved_Words/S7.5.3_A1.22ns.js @@ -0,0 +1,13 @@ +// Copyright 2011 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * @name: S7.5.3_A1.22; + * @section: 7.5.3; + * @assertion: The "private" token can be used as identifier in + * non-strict code; + * @description: Checking if execution of "private=1" succeeds in + * non-strict code; + */ + +new Function('private = 1'); diff --git a/test/suite/sputnik/Conformance/07_Lexical_Conventions/7.5_Tokens/7.5.3_Future_Reserved_Words/S7.5.3_A1.23.js b/test/suite/sputnik/Conformance/07_Lexical_Conventions/7.5_Tokens/7.5.3_Future_Reserved_Words/S7.5.3_A1.23.js index d99fd24765..fb272f7bcb 100644 --- a/test/suite/sputnik/Conformance/07_Lexical_Conventions/7.5_Tokens/7.5.3_Future_Reserved_Words/S7.5.3_A1.23.js +++ b/test/suite/sputnik/Conformance/07_Lexical_Conventions/7.5_Tokens/7.5.3_Future_Reserved_Words/S7.5.3_A1.23.js @@ -1,12 +1,15 @@ -// Copyright 2009 the Sputnik authors. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/** - * @name: S7.5.3_A1.23; - * @section: 7.5.3; - * @assertion: The "protected" token can not be used as identifier; - * @description: Checking if execution of "protected=1" fails; - * @negative -*/ - -protected = 1; +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * @name: S7.5.3_A1.23; + * @section: 7.5.3; + * @assertion: The "protected" token can not be used as identifier in + * strict code; + * @description: Checking if execution of "protected=1" fails in + * strict code; + * @negative + */ + +"use strict"; +protected = 1; diff --git a/test/suite/sputnik/Conformance/07_Lexical_Conventions/7.5_Tokens/7.5.3_Future_Reserved_Words/S7.5.3_A1.23ns.js b/test/suite/sputnik/Conformance/07_Lexical_Conventions/7.5_Tokens/7.5.3_Future_Reserved_Words/S7.5.3_A1.23ns.js new file mode 100644 index 0000000000..19bc9f963d --- /dev/null +++ b/test/suite/sputnik/Conformance/07_Lexical_Conventions/7.5_Tokens/7.5.3_Future_Reserved_Words/S7.5.3_A1.23ns.js @@ -0,0 +1,13 @@ +// Copyright 2011 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * @name: S7.5.3_A1.23; + * @section: 7.5.3; + * @assertion: The "protected" token can be used as identifier in + * non-strict code; + * @description: Checking if execution of "protected=1" succeeds in + * non-strict code; + */ + +new Function('protected = 1'); diff --git a/test/suite/sputnik/Conformance/07_Lexical_Conventions/7.5_Tokens/7.5.3_Future_Reserved_Words/S7.5.3_A1.24.js b/test/suite/sputnik/Conformance/07_Lexical_Conventions/7.5_Tokens/7.5.3_Future_Reserved_Words/S7.5.3_A1.24.js index bc3953b8c5..ff34269494 100644 --- a/test/suite/sputnik/Conformance/07_Lexical_Conventions/7.5_Tokens/7.5.3_Future_Reserved_Words/S7.5.3_A1.24.js +++ b/test/suite/sputnik/Conformance/07_Lexical_Conventions/7.5_Tokens/7.5.3_Future_Reserved_Words/S7.5.3_A1.24.js @@ -1,12 +1,14 @@ -// Copyright 2009 the Sputnik authors. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/** - * @name: S7.5.3_A1.24; - * @section: 7.5.3; - * @assertion: The "public" token can not be used as identifier; - * @description: Checking if execution of "public=1" fails; - * @negative -*/ - -public = 1; +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * @name: S7.5.3_A1.24; + * @section: 7.5.3; + * @assertion: The "public" token can not be used as identifier in + * strict code; + * @description: Checking if execution of "public=1" fails in strict code; + * @negative + */ + +"use strict"; +public = 1; diff --git a/test/suite/sputnik/Conformance/07_Lexical_Conventions/7.5_Tokens/7.5.3_Future_Reserved_Words/S7.5.3_A1.24ns.js b/test/suite/sputnik/Conformance/07_Lexical_Conventions/7.5_Tokens/7.5.3_Future_Reserved_Words/S7.5.3_A1.24ns.js new file mode 100644 index 0000000000..cd4b780b52 --- /dev/null +++ b/test/suite/sputnik/Conformance/07_Lexical_Conventions/7.5_Tokens/7.5.3_Future_Reserved_Words/S7.5.3_A1.24ns.js @@ -0,0 +1,13 @@ +// Copyright 2011 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * @name: S7.5.3_A1.24; + * @section: 7.5.3; + * @assertion: The "public" token can be used as identifier in + * non-strict code; + * @description: Checking if execution of "public=1" succeeds in + * non-strict code; + */ + +new Function('public = 1'); diff --git a/test/suite/sputnik/Conformance/07_Lexical_Conventions/7.5_Tokens/7.5.3_Future_Reserved_Words/S7.5.3_A1.25.js b/test/suite/sputnik/Conformance/07_Lexical_Conventions/7.5_Tokens/7.5.3_Future_Reserved_Words/S7.5.3_A1.25.js index 0827f2a578..10218efbcb 100644 --- a/test/suite/sputnik/Conformance/07_Lexical_Conventions/7.5_Tokens/7.5.3_Future_Reserved_Words/S7.5.3_A1.25.js +++ b/test/suite/sputnik/Conformance/07_Lexical_Conventions/7.5_Tokens/7.5.3_Future_Reserved_Words/S7.5.3_A1.25.js @@ -1,12 +1,11 @@ -// Copyright 2009 the Sputnik authors. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/** - * @name: S7.5.3_A1.25; - * @section: 7.5.3; - * @assertion: The "short" token can not be used as identifier; - * @description: Checking if execution of "short=1" fails; - * @negative -*/ - -short = 1; +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * @name: S7.5.3_A1.25; + * @section: 7.5.3; + * @assertion: The "short" token can be used as identifier; + * @description: Checking if execution of "short=1" succeeds; + */ + +short = 1; diff --git a/test/suite/sputnik/Conformance/07_Lexical_Conventions/7.5_Tokens/7.5.3_Future_Reserved_Words/S7.5.3_A1.26.js b/test/suite/sputnik/Conformance/07_Lexical_Conventions/7.5_Tokens/7.5.3_Future_Reserved_Words/S7.5.3_A1.26.js index 05c7d1dc59..a26ad6d7f9 100644 --- a/test/suite/sputnik/Conformance/07_Lexical_Conventions/7.5_Tokens/7.5.3_Future_Reserved_Words/S7.5.3_A1.26.js +++ b/test/suite/sputnik/Conformance/07_Lexical_Conventions/7.5_Tokens/7.5.3_Future_Reserved_Words/S7.5.3_A1.26.js @@ -1,12 +1,14 @@ -// Copyright 2009 the Sputnik authors. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/** - * @name: S7.5.3_A1.26; - * @section: 7.5.3; - * @assertion: The "static" token can not be used as identifier; - * @description: Checking if execution of "static=1" fails; - * @negative -*/ - -static = 1; +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * @name: S7.5.3_A1.26; + * @section: 7.5.3; + * @assertion: The "static" token can not be used as identifier in + * strict code; + * @description: Checking if execution of "static=1" fails in strict code; + * @negative +*/ + +"use strict"; +static = 1; diff --git a/test/suite/sputnik/Conformance/07_Lexical_Conventions/7.5_Tokens/7.5.3_Future_Reserved_Words/S7.5.3_A1.26ns.js b/test/suite/sputnik/Conformance/07_Lexical_Conventions/7.5_Tokens/7.5.3_Future_Reserved_Words/S7.5.3_A1.26ns.js new file mode 100644 index 0000000000..9d47c76d70 --- /dev/null +++ b/test/suite/sputnik/Conformance/07_Lexical_Conventions/7.5_Tokens/7.5.3_Future_Reserved_Words/S7.5.3_A1.26ns.js @@ -0,0 +1,13 @@ +// Copyright 2011 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * @name: S7.5.3_A1.26; + * @section: 7.5.3; + * @assertion: The "static" token can be used as identifier in + * non-strict code; + * @description: Checking if execution of "static=1" succeeds in + * non-strict code; + */ + +new Function('static = 1'); diff --git a/test/suite/sputnik/Conformance/07_Lexical_Conventions/7.5_Tokens/7.5.3_Future_Reserved_Words/S7.5.3_A1.28.js b/test/suite/sputnik/Conformance/07_Lexical_Conventions/7.5_Tokens/7.5.3_Future_Reserved_Words/S7.5.3_A1.28.js index 1025b574d0..d70f857abf 100644 --- a/test/suite/sputnik/Conformance/07_Lexical_Conventions/7.5_Tokens/7.5.3_Future_Reserved_Words/S7.5.3_A1.28.js +++ b/test/suite/sputnik/Conformance/07_Lexical_Conventions/7.5_Tokens/7.5.3_Future_Reserved_Words/S7.5.3_A1.28.js @@ -1,12 +1,11 @@ -// Copyright 2009 the Sputnik authors. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/** - * @name: S7.5.3_A1.28; - * @section: 7.5.3; - * @assertion: The "synchronized" token can not be used as identifier; - * @description: Checking if execution of "synchronized=1" fails; - * @negative -*/ - -synchronized = 1; +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * @name: S7.5.3_A1.28; + * @section: 7.5.3; + * @assertion: The "synchronized" token can be used as identifier; + * @description: Checking if execution of "synchronized=1" succeeds; +*/ + +synchronized = 1; diff --git a/test/suite/sputnik/Conformance/07_Lexical_Conventions/7.5_Tokens/7.5.3_Future_Reserved_Words/S7.5.3_A1.29.js b/test/suite/sputnik/Conformance/07_Lexical_Conventions/7.5_Tokens/7.5.3_Future_Reserved_Words/S7.5.3_A1.29.js index 89d8f8b281..6aa1b70e4d 100644 --- a/test/suite/sputnik/Conformance/07_Lexical_Conventions/7.5_Tokens/7.5.3_Future_Reserved_Words/S7.5.3_A1.29.js +++ b/test/suite/sputnik/Conformance/07_Lexical_Conventions/7.5_Tokens/7.5.3_Future_Reserved_Words/S7.5.3_A1.29.js @@ -1,12 +1,11 @@ -// Copyright 2009 the Sputnik authors. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/** - * @name: S7.5.3_A1.29; - * @section: 7.5.3; - * @assertion: The "throws" token can not be used as identifier; - * @description: Checking if execution of "throws=1" fails; - * @negative -*/ - -throws = 1; +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * @name: S7.5.3_A1.29; + * @section: 7.5.3; + * @assertion: The "throws" token can be used as identifier; + * @description: Checking if execution of "throws=1" succeeds; +*/ + +throws = 1; diff --git a/test/suite/sputnik/Conformance/07_Lexical_Conventions/7.5_Tokens/7.5.3_Future_Reserved_Words/S7.5.3_A1.3.js b/test/suite/sputnik/Conformance/07_Lexical_Conventions/7.5_Tokens/7.5.3_Future_Reserved_Words/S7.5.3_A1.3.js index d89ffdbbba..5d17b3639f 100644 --- a/test/suite/sputnik/Conformance/07_Lexical_Conventions/7.5_Tokens/7.5.3_Future_Reserved_Words/S7.5.3_A1.3.js +++ b/test/suite/sputnik/Conformance/07_Lexical_Conventions/7.5_Tokens/7.5.3_Future_Reserved_Words/S7.5.3_A1.3.js @@ -1,12 +1,11 @@ -// Copyright 2009 the Sputnik authors. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/** - * @name: S7.5.3_A1.3; - * @section: 7.5.3; - * @assertion: The "byte" token can not be used as identifier; - * @description: Checking if execution of "byte=1" fails; - * @negative -*/ - -byte = 1; +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * @name: S7.5.3_A1.3; + * @section: 7.5.3; + * @assertion: The "byte" token can be used as identifier; + * @description: Checking if execution of "byte=1" succeeds; + */ + +byte = 1; diff --git a/test/suite/sputnik/Conformance/07_Lexical_Conventions/7.5_Tokens/7.5.3_Future_Reserved_Words/S7.5.3_A1.30.js b/test/suite/sputnik/Conformance/07_Lexical_Conventions/7.5_Tokens/7.5.3_Future_Reserved_Words/S7.5.3_A1.30.js index 0d726ec797..23d1e296f5 100644 --- a/test/suite/sputnik/Conformance/07_Lexical_Conventions/7.5_Tokens/7.5.3_Future_Reserved_Words/S7.5.3_A1.30.js +++ b/test/suite/sputnik/Conformance/07_Lexical_Conventions/7.5_Tokens/7.5.3_Future_Reserved_Words/S7.5.3_A1.30.js @@ -1,12 +1,11 @@ -// Copyright 2009 the Sputnik authors. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/** - * @name: S7.5.3_A1.30; - * @section: 7.5.3; - * @assertion: The "transient" token can not be used as identifier; - * @description: Checking if execution of "transient=1" fails; - * @negative -*/ - -transient = 1; +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * @name: S7.5.3_A1.30; + * @section: 7.5.3; + * @assertion: The "transient" token can be used as identifier; + * @description: Checking if execution of "transient=1" succeeds; + */ + +transient = 1; diff --git a/test/suite/sputnik/Conformance/07_Lexical_Conventions/7.5_Tokens/7.5.3_Future_Reserved_Words/S7.5.3_A1.31.js b/test/suite/sputnik/Conformance/07_Lexical_Conventions/7.5_Tokens/7.5.3_Future_Reserved_Words/S7.5.3_A1.31.js index c16a5ea508..67fcbc7228 100644 --- a/test/suite/sputnik/Conformance/07_Lexical_Conventions/7.5_Tokens/7.5.3_Future_Reserved_Words/S7.5.3_A1.31.js +++ b/test/suite/sputnik/Conformance/07_Lexical_Conventions/7.5_Tokens/7.5.3_Future_Reserved_Words/S7.5.3_A1.31.js @@ -1,12 +1,11 @@ -// Copyright 2009 the Sputnik authors. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/** - * @name: S7.5.3_A1.31; - * @section: 7.5.3; - * @assertion: The "volatile" token can not be used as identifier; - * @description: Checking if execution of "volatile=1" fails; - * @negative -*/ - -volatile = 1; +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * @name: S7.5.3_A1.31; + * @section: 7.5.3; + * @assertion: The "volatile" token can be used as identifier; + * @description: Checking if execution of "volatile=1" succeeds; + */ + +volatile = 1; diff --git a/test/suite/sputnik/Conformance/07_Lexical_Conventions/7.5_Tokens/7.5.3_Future_Reserved_Words/S7.5.3_A1.4.js b/test/suite/sputnik/Conformance/07_Lexical_Conventions/7.5_Tokens/7.5.3_Future_Reserved_Words/S7.5.3_A1.4.js index edbfe20aaf..589c6b5533 100644 --- a/test/suite/sputnik/Conformance/07_Lexical_Conventions/7.5_Tokens/7.5.3_Future_Reserved_Words/S7.5.3_A1.4.js +++ b/test/suite/sputnik/Conformance/07_Lexical_Conventions/7.5_Tokens/7.5.3_Future_Reserved_Words/S7.5.3_A1.4.js @@ -1,12 +1,11 @@ -// Copyright 2009 the Sputnik authors. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/** - * @name: S7.5.3_A1.4; - * @section: 7.5.3; - * @assertion: The "char" token can not be used as identifier; - * @description: Checking if execution of "char=1" fails; - * @negative -*/ - -char = 1; +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * @name: S7.5.3_A1.4; + * @section: 7.5.3; + * @assertion: The "char" token can be used as identifier; + * @description: Checking if execution of "char=1" succeeds; + */ + +char = 1; diff --git a/test/suite/sputnik/Conformance/07_Lexical_Conventions/7.5_Tokens/7.5.3_Future_Reserved_Words/S7.5.3_A1.8.js b/test/suite/sputnik/Conformance/07_Lexical_Conventions/7.5_Tokens/7.5.3_Future_Reserved_Words/S7.5.3_A1.8.js index ab1ef74d71..40e509a3e7 100644 --- a/test/suite/sputnik/Conformance/07_Lexical_Conventions/7.5_Tokens/7.5.3_Future_Reserved_Words/S7.5.3_A1.8.js +++ b/test/suite/sputnik/Conformance/07_Lexical_Conventions/7.5_Tokens/7.5.3_Future_Reserved_Words/S7.5.3_A1.8.js @@ -1,12 +1,11 @@ -// Copyright 2009 the Sputnik authors. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/** - * @name: S7.5.3_A1.8; - * @section: 7.5.3; - * @assertion: The "double" token can not be used as identifier; - * @description: Checking if execution of "double=1" fails; - * @negative -*/ - -double = 1; +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * @name: S7.5.3_A1.8; + * @section: 7.5.3; + * @assertion: The "double" token can be used as identifier; + * @description: Checking if execution of "double=1" succeeds; + */ + +double = 1; diff --git a/test/suite/sputnik/Conformance/07_Lexical_Conventions/7.8_Literals/7.8.5_Regular_Expression_Literals/S7.8.5_A3.1_T7.js b/test/suite/sputnik/Conformance/07_Lexical_Conventions/7.8_Literals/7.8.5_Regular_Expression_Literals/S7.8.5_A3.1_T7.js index f05423d274..4c112480b2 100644 --- a/test/suite/sputnik/Conformance/07_Lexical_Conventions/7.8_Literals/7.8.5_Regular_Expression_Literals/S7.8.5_A3.1_T7.js +++ b/test/suite/sputnik/Conformance/07_Lexical_Conventions/7.8_Literals/7.8.5_Regular_Expression_Literals/S7.8.5_A3.1_T7.js @@ -1,20 +1,15 @@ -// Copyright 2009 the Sputnik authors. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/** - * @name: S7.8.5_A3.1_T7; - * @section: 7.8.5, 15.10.4.1; - * @assertion: RegularExpressionFlags :: IdentifierPart; - * @description: IdentifierPart :: \u0067 (g); -*/ - -//CHECK#1 - -//Test262 Change -//var regexp = /(?:)/\u0067; -var regexp; -eval('regexp = /(?:)/\\u0067;'); - -if (regexp.global !== true) { - $ERROR('#1: var regexp = /(?:)/\\u0067; regexp.global === true. Actual: ' + (regexp.global)); -} +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * @name: S7.8.5_A3.1_T7; + * @section: 7.8.5, 15.10.4.1; + * @assertion: RegularExpressionFlags :: IdentifierPart; + * @description: IdentifierPart :: \u0067 (g); +*/ + +//CHECK#1 +var regexp = /(?:)/\u0067; +if (regexp.global !== true) { + $ERROR('#1: var regexp = /(?:)/\\u0067; regexp.global === true. Actual: ' + (regexp.global)); +} diff --git a/test/suite/sputnik/Conformance/07_Lexical_Conventions/7.8_Literals/7.8.5_Regular_Expression_Literals/S7.8.5_A3.1_T8.js b/test/suite/sputnik/Conformance/07_Lexical_Conventions/7.8_Literals/7.8.5_Regular_Expression_Literals/S7.8.5_A3.1_T8.js index b2021e6ad0..75d4a72af6 100644 --- a/test/suite/sputnik/Conformance/07_Lexical_Conventions/7.8_Literals/7.8.5_Regular_Expression_Literals/S7.8.5_A3.1_T8.js +++ b/test/suite/sputnik/Conformance/07_Lexical_Conventions/7.8_Literals/7.8.5_Regular_Expression_Literals/S7.8.5_A3.1_T8.js @@ -1,21 +1,15 @@ -// Copyright 2009 the Sputnik authors. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/** - * @name: S7.8.5_A3.1_T8; - * @section: 7.8.5, 15.10.4.1; - * @assertion: RegularExpressionFlags :: IdentifierPart; - * @description: IdentifierPart :: \u0069 (i); -*/ - -//CHECK#1 - -//Test262 Change -//var regexp = /(?:)/\u0069; - -var regexp; -eval('regexp = /(?:)/\\u0069;'); - -if (regexp.ignoreCase !== true) { - $ERROR('#1: var regexp = /(?:)/\\u0069; regexp.ignoreCase === true. Actual: ' + (regexp.ignoreCase)); -} +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * @name: S7.8.5_A3.1_T8; + * @section: 7.8.5, 15.10.4.1; + * @assertion: RegularExpressionFlags :: IdentifierPart; + * @description: IdentifierPart :: \u0069 (i); +*/ + +//CHECK#1 +var regexp = /(?:)/\u0069; +if (regexp.ignoreCase !== true) { + $ERROR('#1: var regexp = /(?:)/\\u0069; regexp.ignoreCase === true. Actual: ' + (regexp.ignoreCase)); +} diff --git a/test/suite/sputnik/Conformance/07_Lexical_Conventions/7.8_Literals/7.8.5_Regular_Expression_Literals/S7.8.5_A3.1_T9.js b/test/suite/sputnik/Conformance/07_Lexical_Conventions/7.8_Literals/7.8.5_Regular_Expression_Literals/S7.8.5_A3.1_T9.js index ef3bc4d16d..2086e12fe5 100644 --- a/test/suite/sputnik/Conformance/07_Lexical_Conventions/7.8_Literals/7.8.5_Regular_Expression_Literals/S7.8.5_A3.1_T9.js +++ b/test/suite/sputnik/Conformance/07_Lexical_Conventions/7.8_Literals/7.8.5_Regular_Expression_Literals/S7.8.5_A3.1_T9.js @@ -1,20 +1,15 @@ -// Copyright 2009 the Sputnik authors. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/** - * @name: S7.8.5_A3.1_T9; - * @section: 7.8.5, 15.10.4.1; - * @assertion: RegularExpressionFlags :: IdentifierPart; - * @description: IdentifierPart :: \u006D (m); -*/ - -//CHECK#1 - -//Test262 Change -//var regexp = /(?:)/\u006D; -var regexp; -eval('regexp = /(?:)/\\u006D;'); - -if (regexp.multiline !== true) { - $ERROR('#1: var regexp = /(?:)/\\u006D; regexp.multiline === true. Actual: ' + (regexp.multiline)); -} +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * @name: S7.8.5_A3.1_T9; + * @section: 7.8.5, 15.10.4.1; + * @assertion: RegularExpressionFlags :: IdentifierPart; + * @description: IdentifierPart :: \u006D (m); +*/ + +//CHECK#1 +var regexp = /(?:)/\u006D; +if (regexp.multiline !== true) { + $ERROR('#1: var regexp = /(?:)/\\u006D; regexp.multiline === true. Actual: ' + (regexp.multiline)); +} diff --git a/test/suite/sputnik/Conformance/12_Statement/12.10_The_with_Statement/S12.10_A3.3_T4.js b/test/suite/sputnik/Conformance/12_Statement/12.10_The_with_Statement/S12.10_A3.3_T4.js index 6cb0081c73..9932f9d9ba 100644 --- a/test/suite/sputnik/Conformance/12_Statement/12.10_The_with_Statement/S12.10_A3.3_T4.js +++ b/test/suite/sputnik/Conformance/12_Statement/12.10_The_with_Statement/S12.10_A3.3_T4.js @@ -1,57 +1,59 @@ -// Copyright 2009 the Sputnik authors. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/** - * @name: S12.10_A3.3_T4; - * @section: 12.10; - * @assertion: No matter how control leaves the embedded 'Statement', - * the scope chain is always restored to its former state; - * @description: Declaring "with" statement within a function constructor, leading to completion by exception; - * @strict_mode_negative - */ - -this.p1 = 1; - -var result = "result"; - -var myObj = { - p1: 'a', - value: 'myObj_value', - valueOf : function(){return 'obj_valueOf';} -} - -try { - function __FACTORY(){ - with(myObj){ - p1 = 'x1'; - throw value; - } - } - var obj = new __FACTORY(); -} catch(e){ - result = p1; -} - -////////////////////////////////////////////////////////////////////////////// -//CHECK#1 -if(result !== 1){ - $ERROR('#1: result === 1. Actual: result ==='+ result ); -} -// -////////////////////////////////////////////////////////////////////////////// - -////////////////////////////////////////////////////////////////////////////// -//CHECK#2 -if(p1 !== 1){ - $ERROR('#2: p1 === 1. Actual: p1 ==='+ p1 ); -} -// -////////////////////////////////////////////////////////////////////////////// - -////////////////////////////////////////////////////////////////////////////// -//CHECK#3 -if(myObj.p1 !== "x1"){ - $ERROR('#3: myObj.p1 === "x1". Actual: myObj.p1 ==='+ myObj.p1 ); -} -// -////////////////////////////////////////////////////////////////////////////// +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * @name: S12.10_A3.3_T4; + * @section: 12.10; + * @assertion: No matter how control leaves the embedded 'Statement', + * the scope chain is always restored to its former state; + * @description: Declaring "with" statement within a function + * constructor, leading to completion by exception; + * @strict_mode_negative + */ + +this.p1 = 1; + +var result = "result"; + +var myObj = { + p1: 'a', + value: 'myObj_value', + valueOf : function(){return 'obj_valueOf';} +}; + +function __FACTORY(){ + with(myObj){ + var p1 = 'x1'; + throw value; + } +} + +try { + var obj = new __FACTORY(); +} catch(e){ + result = p1; +} + +////////////////////////////////////////////////////////////////////////////// +//CHECK#1 +if (result !== 1) { + $ERROR('#1: result === 1. Actual: result ==='+ result ); +} +// +////////////////////////////////////////////////////////////////////////////// + +////////////////////////////////////////////////////////////////////////////// +//CHECK#2 +if (p1 !== 1) { + $ERROR('#2: p1 === 1. Actual: p1 ==='+ p1 ); +} +// +////////////////////////////////////////////////////////////////////////////// + +////////////////////////////////////////////////////////////////////////////// +//CHECK#3 +if (myObj.p1 !== "x1") { + $ERROR('#3: myObj.p1 === "x1". Actual: myObj.p1 ==='+ myObj.p1 ); +} +// +////////////////////////////////////////////////////////////////////////////// diff --git a/test/suite/sputnik/Conformance/12_Statement/12.14_The_try_Statement/S12.14_A14.js b/test/suite/sputnik/Conformance/12_Statement/12.14_The_try_Statement/S12.14_A14.js index 3207e2d638..d6b9298d4f 100644 --- a/test/suite/sputnik/Conformance/12_Statement/12.14_The_try_Statement/S12.14_A14.js +++ b/test/suite/sputnik/Conformance/12_Statement/12.14_The_try_Statement/S12.14_A14.js @@ -1,77 +1,78 @@ -// Copyright 2009 the Sputnik authors. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/** - * @name: S12.14_A14; - * @section: 12.14; - * @assertion: Using "try" with "catch" or "finally" statement within/without a "with" statement; - * @description: Using try/catch/finally in With and With in try/catch/finally; - */ - -var myObj = {p1: 'a', - p2: 'b', - p3: 'c', - value: 'myObj_value', - valueOf : function(){return 'obj_valueOf';}, - parseInt : function(){return 'obj_parseInt';}, - NaN : 'obj_NaN', - Infinity : 'obj_Infinity', - eval : function(){return 'obj_eval';}, - parseFloat : function(){return 'obj_parseFloat';}, - isNaN : function(){return 'obj_isNaN';}, - isFinite : function(){return 'obj_isFinite';} -} - -// CHECK#1 -try{ - with(myObj){ - throw "ex"; - } -} -catch(e){ - if (e!=="ex") $ERROR('#1: Exception ==="ex". Actual: Exception ==='+ e ); -} - -// CHECK#2 -with(myObj){ - try{ - throw p1; - } - catch(e){ - if (e!=="a") $ERROR('#2.1: Exception ==="a". Actual: Exception ==='+ e ); - p1='pass'; - } -} -if(myObj.p1!=='pass') $ERROR('#2.2: "throw p1" lead to throwing exception'); - -// CHECK#3 -with(myObj){ - try{ - p1='fail'; - throw p2; - } - catch(e){ - if (e!=="b") $ERROR('#3.1: Exception ==="b". Actual: Exception ==='+ e ); - p1='pass'; - } - finally{ - p2='pass'; - } -} -if(myObj.p1!=='pass') $ERROR('#3.2: "throw p2" lead to throwing exception'); -if(myObj.p2!=='pass') $ERROR('#3.3: "finally" block must be evaluated'); - -// CHECK#4 -myObj.p1='fail'; -try{ - with(myObj){ - try{ - throw p3; - } - finally{ - p1='pass'; - } - } -} -catch(e){} -if(myObj.p1!=='pass') $ERROR('#4: "finally" block must be evaluated'); +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * @name: S12.14_A14; + * @section: 12.14; + * @assertion: Using "try" with "catch" or "finally" statement within/without a "with" statement; + * @description: Using try/catch/finally in With and With in try/catch/finally; + * @strict_mode_negative SyntaxError; + */ + +var myObj = {p1: 'a', + p2: 'b', + p3: 'c', + value: 'myObj_value', + valueOf : function(){return 'obj_valueOf';}, + parseInt : function(){return 'obj_parseInt';}, + NaN : 'obj_NaN', + Infinity : 'obj_Infinity', + eval : function(){return 'obj_eval';}, + parseFloat : function(){return 'obj_parseFloat';}, + isNaN : function(){return 'obj_isNaN';}, + isFinite : function(){return 'obj_isFinite';} +} + +// CHECK#1 +try{ + with(myObj){ + throw "ex"; + } +} +catch(e){ + if (e!=="ex") $ERROR('#1: Exception ==="ex". Actual: Exception ==='+ e ); +} + +// CHECK#2 +with(myObj){ + try{ + throw p1; + } + catch(e){ + if (e!=="a") $ERROR('#2.1: Exception ==="a". Actual: Exception ==='+ e ); + p1='pass'; + } +} +if(myObj.p1!=='pass') $ERROR('#2.2: "throw p1" lead to throwing exception'); + +// CHECK#3 +with(myObj){ + try{ + p1='fail'; + throw p2; + } + catch(e){ + if (e!=="b") $ERROR('#3.1: Exception ==="b". Actual: Exception ==='+ e ); + p1='pass'; + } + finally{ + p2='pass'; + } +} +if(myObj.p1!=='pass') $ERROR('#3.2: "throw p2" lead to throwing exception'); +if(myObj.p2!=='pass') $ERROR('#3.3: "finally" block must be evaluated'); + +// CHECK#4 +myObj.p1='fail'; +try{ + with(myObj){ + try{ + throw p3; + } + finally{ + p1='pass'; + } + } +} +catch(e){} +if(myObj.p1!=='pass') $ERROR('#4: "finally" block must be evaluated'); diff --git a/test/suite/sputnik/Conformance/12_Statement/12.14_The_try_Statement/S12.14_A4.js b/test/suite/sputnik/Conformance/12_Statement/12.14_The_try_Statement/S12.14_A4.js index 7f5a067078..e768092322 100644 --- a/test/suite/sputnik/Conformance/12_Statement/12.14_The_try_Statement/S12.14_A4.js +++ b/test/suite/sputnik/Conformance/12_Statement/12.14_The_try_Statement/S12.14_A4.js @@ -1,35 +1,36 @@ -// Copyright 2009 the Sputnik authors. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/** - * @name: S12.14_A4; - * @section: 12.14; - * @assertion: Sanity test for "catch(Indetifier) statement"; - * @description: Checking if deleting an exception fails; - */ - -// CHECK#1 -try { - throw "catchme"; - $ERROR('#1.1: throw "catchme" lead to throwing exception'); -} -catch (e) { - if (delete e){ - $ERROR('#1.2: Exception has DontDelete property'); - } - if (e!=="catchme") { - $ERROR('#1.3: Exception === "catchme". Actual: Exception ==='+ e ); - } -} - -// CHECK#2 -try { - throw "catchme"; - $ERROR('#2.1: throw "catchme" lead to throwing exception'); -} -catch(e){} -try{ - e; - $ERROR('#2.2: Deleting catching exception after ending "catch" block'); -} -catch(err){} +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * @name: S12.14_A4; + * @section: 12.14; + * @assertion: Sanity test for "catch(Indetifier) statement"; + * @description: Checking if deleting an exception fails; + * @strict_mode_negative SyntaxError; + */ + +// CHECK#1 +try { + throw "catchme"; + $ERROR('#1.1: throw "catchme" lead to throwing exception'); +} +catch (e) { + if (delete e){ + $ERROR('#1.2: Exception has DontDelete property'); + } + if (e!=="catchme") { + $ERROR('#1.3: Exception === "catchme". Actual: Exception ==='+ e ); + } +} + +// CHECK#2 +try { + throw "catchme"; + $ERROR('#2.1: throw "catchme" lead to throwing exception'); +} +catch(e){} +try{ + e; + $ERROR('#2.2: Deleting catching exception after ending "catch" block'); +} +catch(err){} diff --git a/test/suite/sputnik/Conformance/12_Statement/12.1_Block/S12.1_A1.js b/test/suite/sputnik/Conformance/12_Statement/12.1_Block/S12.1_A1.js index 2f7a24e347..e9f3f79e24 100644 --- a/test/suite/sputnik/Conformance/12_Statement/12.1_Block/S12.1_A1.js +++ b/test/suite/sputnik/Conformance/12_Statement/12.1_Block/S12.1_A1.js @@ -1,13 +1,18 @@ -// Copyright 2009 the Sputnik authors. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/** -* @name: S12.1_A1; -* @section: 12.1; -* @assertion: The production Block { } can't contain function declaration; -* @description: Trying to declare function at the Block statement; -* @negative; -*/ -{ - function __func(){} -} +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** +* @name: S12.1_A1; +* @section: 12.1; +* @assertion: The production Block { } in strict code can't contain +* function declaration; +* @description: Trying to declare function at the Block statement; +* @negative SyntaxError; +*/ + +"use strict"; +if (!strict_mode) { throw new SyntaxError('unspecified case'); } + +{ + function __func(){} +} diff --git a/test/suite/sputnik/Conformance/12_Statement/12.5_The_if_Statement/S12.5_A7.js b/test/suite/sputnik/Conformance/12_Statement/12.5_The_if_Statement/S12.5_A7.js index 4968eb7123..7d213f3c6c 100644 --- a/test/suite/sputnik/Conformance/12_Statement/12.5_The_if_Statement/S12.5_A7.js +++ b/test/suite/sputnik/Conformance/12_Statement/12.5_The_if_Statement/S12.5_A7.js @@ -1,25 +1,25 @@ -// Copyright 2009 the Sputnik authors. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/** -* @name: S12.5_A7; -* @section: 12.5; -* @assertion: In the "if" statement empty statement is allowed and is evaluated to "undefined"; -* @description: Checking by using eval "eval("if(1);"))"; -*/ - - -////////////////////////////////////////////////////////////////////////////// -//CHECK#1 -try { - __evaluated = eval("if(1);"); - if (__evaluated !== undefined) { - $ERROR('#1: __evaluated === undefined. Actual: __evaluated ==='+ __evaluated ); - } - -} catch (e) { - $ERROR('#1.1: "__evaluated = eval("if(1);")" does not lead to throwing exception'); - -} -// -////////////////////////////////////////////////////////////////////////////// +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** +* @name: S12.5_A7; +* @section: 12.5; +* @assertion: In the "if" statement empty statement is allowed and is evaluated to "undefined"; +* @description: Checking by using eval "eval("if(1);"))"; +*/ + + +////////////////////////////////////////////////////////////////////////////// +//CHECK#1 +try { + var __evaluated = eval("if(1);"); + if (__evaluated !== undefined) { + $ERROR('#1: __evaluated === undefined. Actual: __evaluated ==='+ __evaluated ); + } + +} catch (e) { + $ERROR('#1.1: "__evaluated = eval("if(1);")" does not lead to throwing exception'); + +} +// +////////////////////////////////////////////////////////////////////////////// diff --git a/test/suite/sputnik/Conformance/12_Statement/12.5_The_if_Statement/S12.5_A9_T1.js b/test/suite/sputnik/Conformance/12_Statement/12.5_The_if_Statement/S12.5_A9_T1.js index 3613a982b1..498bd3578e 100644 --- a/test/suite/sputnik/Conformance/12_Statement/12.5_The_if_Statement/S12.5_A9_T1.js +++ b/test/suite/sputnik/Conformance/12_Statement/12.5_The_if_Statement/S12.5_A9_T1.js @@ -1,16 +1,20 @@ -// Copyright 2009 the Sputnik authors. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/** -* @name: S12.5_A9_T1; -* @section: 12.5; -* @assertion: Function declaration within an "if" statement is not allowed; -* @description: Declaring function within an "if" statement; -* @negative; -*/ - -if (true) { - function __func(){}; -} else { - function __func(){}; -} +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** +* @name: S12.5_A9_T1; +* @section: 12.5; +* @assertion: Function declaration within an "if" statement in strict +* code is not allowed; +* @description: Declaring function within an "if" statement; +* @negative SyntaxError; +*/ + +"use strict"; +if (!strict_mode) { throw new SyntaxError('unspecified case'); } + +if (true) { + function __func(){}; +} else { + function __func(){}; +} diff --git a/test/suite/sputnik/Conformance/12_Statement/12.5_The_if_Statement/S12.5_A9_T2.js b/test/suite/sputnik/Conformance/12_Statement/12.5_The_if_Statement/S12.5_A9_T2.js index 98c48f8055..ae979d8f76 100644 --- a/test/suite/sputnik/Conformance/12_Statement/12.5_The_if_Statement/S12.5_A9_T2.js +++ b/test/suite/sputnik/Conformance/12_Statement/12.5_The_if_Statement/S12.5_A9_T2.js @@ -1,20 +1,23 @@ -// Copyright 2009 the Sputnik authors. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/** -* @name: S12.5_A9_T2; -* @section: 12.5; -* @assertion: Function declaration within an "if" statement is not allowed; -* @description: Declaring function within and "if" that is declared within the function call; -* @negative; -*/ - -(function(){ - -if (true) { - function __func(){}; -} else { - function __func(){}; -} - -})(); +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** +* @name: S12.5_A9_T2; +* @section: 12.5; +* @assertion: Function declaration within an "if" statement in strict +* code is not allowed; +* @description: Declaring function within an "if" that is declared +* within the strict function; +* @negative SyntaxError; +*/ + +(function(){ +"use strict"; + +if (true) { + function __func(){}; +} else { + function __func(){}; +} + +}); diff --git a/test/suite/sputnik/Conformance/12_Statement/12.6_Iteration_Statements/12.6.1_The_do_while_Statement/S12.6.1_A1.js b/test/suite/sputnik/Conformance/12_Statement/12.6_Iteration_Statements/12.6.1_The_do_while_Statement/S12.6.1_A1.js index 1de59767f2..e0436e37ac 100644 --- a/test/suite/sputnik/Conformance/12_Statement/12.6_Iteration_Statements/12.6.1_The_do_while_Statement/S12.6.1_A1.js +++ b/test/suite/sputnik/Conformance/12_Statement/12.6_Iteration_Statements/12.6.1_The_do_while_Statement/S12.6.1_A1.js @@ -1,39 +1,41 @@ -// Copyright 2009 the Sputnik authors. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/** -* @name: S12.6.1_A1; -* @section: 12.6.1; -* @assertion: When the production "do Statement while ( Expression )" is evaluated, Statement is evaluated first; -* @description: Evaluating various Expressions; -*/ - -do __in__do=1; while ( false ); - -////////////////////////////////////////////////////////////////////////////// -//CHECK#1 -if (__in__do!==1) { - $ERROR('#1: false evaluates to false'); -} -// -////////////////////////////////////////////////////////////////////////////// - -do __in__do=2; while ( 0 ); - -////////////////////////////////////////////////////////////////////////////// -//CHECK#2 -if (__in__do!==2) { - $ERROR('#2: 0 evaluates to false'); -} -// -////////////////////////////////////////////////////////////////////////////// - -do __in__do=3; while ( "" ); - -////////////////////////////////////////////////////////////////////////////// -//CHECK#3 -if (__in__do!==3) { - $ERROR('#3: "" evaluates to false'); -} -// -////////////////////////////////////////////////////////////////////////////// +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** +* @name: S12.6.1_A1; +* @section: 12.6.1; +* @assertion: When the production "do Statement while ( Expression )" is evaluated, Statement is evaluated first; +* @description: Evaluating various Expressions; +*/ + +var __in__do; + +do __in__do=1; while ( false ); + +////////////////////////////////////////////////////////////////////////////// +//CHECK#1 +if (__in__do!==1) { + $ERROR('#1: false evaluates to false'); +} +// +////////////////////////////////////////////////////////////////////////////// + +do __in__do=2; while ( 0 ); + +////////////////////////////////////////////////////////////////////////////// +//CHECK#2 +if (__in__do!==2) { + $ERROR('#2: 0 evaluates to false'); +} +// +////////////////////////////////////////////////////////////////////////////// + +do __in__do=3; while ( "" ); + +////////////////////////////////////////////////////////////////////////////// +//CHECK#3 +if (__in__do!==3) { + $ERROR('#3: "" evaluates to false'); +} +// +////////////////////////////////////////////////////////////////////////////// diff --git a/test/suite/sputnik/Conformance/12_Statement/12.6_Iteration_Statements/12.6.1_The_do_while_Statement/S12.6.1_A13_T1.js b/test/suite/sputnik/Conformance/12_Statement/12.6_Iteration_Statements/12.6.1_The_do_while_Statement/S12.6.1_A13_T1.js index 9bd30414fe..28e118c870 100644 --- a/test/suite/sputnik/Conformance/12_Statement/12.6_Iteration_Statements/12.6.1_The_do_while_Statement/S12.6.1_A13_T1.js +++ b/test/suite/sputnik/Conformance/12_Statement/12.6_Iteration_Statements/12.6.1_The_do_while_Statement/S12.6.1_A13_T1.js @@ -1,14 +1,18 @@ -// Copyright 2009 the Sputnik authors. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/** -* @name: S12.6.1_A13_T1; -* @section: 12.6.1, 13; -* @assertion: FunctionDeclaration within a "do-while" Block is not allowed; -* @description: Declaring function within a "do-while" loop; -* @negative; -*/ - -do{ - function __func(){}; -} while(0); +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** +* @name: S12.6.1_A13_T1; +* @section: 12.6.1, 13; +* @assertion: FunctionDeclaration within a "do-while" Block in strict +* code is not allowed; +* @description: Declaring function within a "do-while" loop; +* @negative SyntaxError; +*/ + +"use strict"; +if (!strict_mode) { throw new SyntaxError('unspecified case'); } + +do{ + function __func(){}; +} while(0); diff --git a/test/suite/sputnik/Conformance/12_Statement/12.6_Iteration_Statements/12.6.1_The_do_while_Statement/S12.6.1_A13_T2.js b/test/suite/sputnik/Conformance/12_Statement/12.6_Iteration_Statements/12.6.1_The_do_while_Statement/S12.6.1_A13_T2.js index c62321a2e2..78cd758818 100644 --- a/test/suite/sputnik/Conformance/12_Statement/12.6_Iteration_Statements/12.6.1_The_do_while_Statement/S12.6.1_A13_T2.js +++ b/test/suite/sputnik/Conformance/12_Statement/12.6_Iteration_Statements/12.6.1_The_do_while_Statement/S12.6.1_A13_T2.js @@ -1,18 +1,20 @@ -// Copyright 2009 the Sputnik authors. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/** -* @name: S12.6.1_A13_T2; -* @section: 12.6.1, 13; -* @assertion: FunctionDeclaration within a "do-while" Block is not allowed; -* @description: Declaring a function within a "do-while" loop that is within a function call; -* @negative; -*/ - -(function(){ - -do{ - function __func(){}; -}while(0); - -})(); +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** +* @name: S12.6.1_A13_T2; +* @section: 12.6.1, 13; +* @assertion: FunctionDeclaration within a "do-while" Block in strict +* code is not allowed; +* @description: Declaring a function within a "do-while" loop that is +* within a strict function; +* @negative SyntaxError; +*/ + +(function(){ +"use strict"; +do{ + function __func(){}; +}while(0); + +}); diff --git a/test/suite/sputnik/Conformance/15_Native/15.10_RegExp_Objects/15.10.6_Properties_of_the_RegExp_Prototype_Object/15.10.6.2_RegExp.prototype.exec/S15.10.6.2_A12.js b/test/suite/sputnik/Conformance/15_Native/15.10_RegExp_Objects/15.10.6_Properties_of_the_RegExp_Prototype_Object/15.10.6.2_RegExp.prototype.exec/S15.10.6.2_A12.js new file mode 100644 index 0000000000..111aedb391 --- /dev/null +++ b/test/suite/sputnik/Conformance/15_Native/15.10_RegExp_Objects/15.10.6_Properties_of_the_RegExp_Prototype_Object/15.10.6.2_RegExp.prototype.exec/S15.10.6.2_A12.js @@ -0,0 +1,18 @@ +// Copyright 2011 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** +* @name: S15.10.6.2_A12; +* @section: 15.10.6.2; +* @assertion: regExp exec() acts like regExp.exec('undefined') (step 2); +* @description: Checking RegExp.prototype.exec.length; +*/ + +(/foo/).test('xfoox'); +var match = new RegExp('(.|\r|\n)*','').exec()[0]; +if (match === 'xfoox') { + $FAIL('#1: regExp.exec() leaks match globally'); +} +if (match !== 'undefined') { + $FAIL('#2: regExp.exec() must coerce absent first arg to "undefined"'); +} diff --git a/test/suite/sputnik/Conformance/15_Native/15.12_The_JSON_Object/15.12.2_JSON.parse/S15.12.2_A1.js b/test/suite/sputnik/Conformance/15_Native/15.12_The_JSON_Object/15.12.2_JSON.parse/S15.12.2_A1.js new file mode 100644 index 0000000000..a7b1408102 --- /dev/null +++ b/test/suite/sputnik/Conformance/15_Native/15.12_The_JSON_Object/15.12.2_JSON.parse/S15.12.2_A1.js @@ -0,0 +1,19 @@ +// Copyright 2011 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * @name: S15.12.2_A1; + * @section: 15.12.2; + * @assertion: JSON.parse must create a property with the given + * property name; + * @description: Tests that JSON.parse treats "__proto__" as a regular + * property name; + */ + +var x = JSON.parse('{"__proto__":[]}'); +if (Object.getPrototypeOf(x) !== Object.prototype) { + $FAIL('#1: JSON.parse confused by "__proto__"'); +} +if (!Array.isArray(x.__proto__)) { + $FAIL('#2: JSON.parse did not set "__proto__" as a regular property'); +} diff --git a/test/suite/sputnik/Conformance/15_Native/15.2_Object_Objects/15.2.4_Properties_of_the_Object_Prototype_Object/15.2.4.2_Object.prototype.toString/S15.2.4.2_A12.js b/test/suite/sputnik/Conformance/15_Native/15.2_Object_Objects/15.2.4_Properties_of_the_Object_Prototype_Object/15.2.4.2_Object.prototype.toString/S15.2.4.2_A12.js new file mode 100644 index 0000000000..466ae756a2 --- /dev/null +++ b/test/suite/sputnik/Conformance/15_Native/15.2_Object_Objects/15.2.4_Properties_of_the_Object_Prototype_Object/15.2.4.2_Object.prototype.toString/S15.2.4.2_A12.js @@ -0,0 +1,12 @@ +// Copyright 2011 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** +* @name: S15.2.4.2_A12; +* @section: 15.2.4.2; +* @assertion: If the this value is undefined, return "[object Undefined]". +*/ + +if (Object.prototype.toString.call(undefined) !== "[object Undefined]") { + $ERROR('If the this value is undefined, return "[object Undefined]".'); +} diff --git a/test/suite/sputnik/Conformance/15_Native/15.2_Object_Objects/15.2.4_Properties_of_the_Object_Prototype_Object/15.2.4.2_Object.prototype.toString/S15.2.4.2_A13.js b/test/suite/sputnik/Conformance/15_Native/15.2_Object_Objects/15.2.4_Properties_of_the_Object_Prototype_Object/15.2.4.2_Object.prototype.toString/S15.2.4.2_A13.js new file mode 100644 index 0000000000..f095a629bc --- /dev/null +++ b/test/suite/sputnik/Conformance/15_Native/15.2_Object_Objects/15.2.4_Properties_of_the_Object_Prototype_Object/15.2.4.2_Object.prototype.toString/S15.2.4.2_A13.js @@ -0,0 +1,12 @@ +// Copyright 2011 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** +* @name: S15.2.4.2_A13; +* @section: 15.2.4.2; +* @assertion: If the this value is null, return "[object Null]". +*/ + +if (Object.prototype.toString.call(null) !== "[object Null]") { + $ERROR('If the this value is null, return "[object Null]".'); +} diff --git a/test/suite/sputnik/Conformance/15_Native/15.2_Object_Objects/15.2.4_Properties_of_the_Object_Prototype_Object/15.2.4.2_Object.prototype.toString/S15.2.4.2_A14.js b/test/suite/sputnik/Conformance/15_Native/15.2_Object_Objects/15.2.4_Properties_of_the_Object_Prototype_Object/15.2.4.2_Object.prototype.toString/S15.2.4.2_A14.js new file mode 100644 index 0000000000..0ac2023ee3 --- /dev/null +++ b/test/suite/sputnik/Conformance/15_Native/15.2_Object_Objects/15.2.4_Properties_of_the_Object_Prototype_Object/15.2.4.2_Object.prototype.toString/S15.2.4.2_A14.js @@ -0,0 +1,14 @@ +// Copyright 2011 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** +* @name: S15.2.4.2_A14; +* @section: 15.2.4.2; +* @assertion: Let O be the result of calling ToObject passing the this +* value as the argument. +*/ + +if (Object.prototype.toString.call(33) !== "[object Number]") { + $ERROR('Let O be the result of calling ToObject passing the this ' + + 'value as the argument.'); +} diff --git a/test/suite/sputnik/Conformance/15_Native/15.2_Object_Objects/15.2.4_Properties_of_the_Object_Prototype_Object/15.2.4.2_Object.prototype.toString/S15.2.4.2_A15.js b/test/suite/sputnik/Conformance/15_Native/15.2_Object_Objects/15.2.4_Properties_of_the_Object_Prototype_Object/15.2.4.2_Object.prototype.toString/S15.2.4.2_A15.js new file mode 100644 index 0000000000..2bcdb6bb91 --- /dev/null +++ b/test/suite/sputnik/Conformance/15_Native/15.2_Object_Objects/15.2.4_Properties_of_the_Object_Prototype_Object/15.2.4.2_Object.prototype.toString/S15.2.4.2_A15.js @@ -0,0 +1,14 @@ +// Copyright 2011 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** +* @name: S15.2.4.2_A15; +* @section: 15.2.4.2; +* @assertion: Let O be the result of calling ToObject passing the this +* value as the argument. +*/ + +if (Object.prototype.toString.call(true) !== "[object Boolean]") { + $ERROR('Let O be the result of calling ToObject passing the this ' + + 'value as the argument.'); +} diff --git a/test/suite/sputnik/Conformance/15_Native/15.2_Object_Objects/15.2.4_Properties_of_the_Object_Prototype_Object/15.2.4.2_Object.prototype.toString/S15.2.4.2_A16.js b/test/suite/sputnik/Conformance/15_Native/15.2_Object_Objects/15.2.4_Properties_of_the_Object_Prototype_Object/15.2.4.2_Object.prototype.toString/S15.2.4.2_A16.js new file mode 100644 index 0000000000..30e0ab548e --- /dev/null +++ b/test/suite/sputnik/Conformance/15_Native/15.2_Object_Objects/15.2.4_Properties_of_the_Object_Prototype_Object/15.2.4.2_Object.prototype.toString/S15.2.4.2_A16.js @@ -0,0 +1,14 @@ +// Copyright 2011 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** +* @name: S15.2.4.2_A16; +* @section: 15.2.4.2; +* @assertion: Let O be the result of calling ToObject passing the this +* value as the argument. +*/ + +if (Object.prototype.toString.call('foo') !== "[object String]") { + $ERROR('Let O be the result of calling ToObject passing the this ' + + 'value as the argument.'); +} diff --git a/test/suite/sputnik/Conformance/15_Native/15.2_Object_Objects/15.2.4_Properties_of_the_Object_Prototype_Object/15.2.4.3_Object.prototype.toLocaleString/S15.2.4.3_A12.js b/test/suite/sputnik/Conformance/15_Native/15.2_Object_Objects/15.2.4_Properties_of_the_Object_Prototype_Object/15.2.4.3_Object.prototype.toLocaleString/S15.2.4.3_A12.js new file mode 100644 index 0000000000..bf78b1aa4c --- /dev/null +++ b/test/suite/sputnik/Conformance/15_Native/15.2_Object_Objects/15.2.4_Properties_of_the_Object_Prototype_Object/15.2.4.3_Object.prototype.toLocaleString/S15.2.4.3_A12.js @@ -0,0 +1,12 @@ +// Copyright 2011 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** +* @name: S15.2.4.3_A12; +* @section: 15.2.4.3; +* @assertion: Let O be the result of calling ToObject passing the this +* value as the argument. +* @negative +*/ + +Object.prototype.toLocaleString.call(undefined); diff --git a/test/suite/sputnik/Conformance/15_Native/15.2_Object_Objects/15.2.4_Properties_of_the_Object_Prototype_Object/15.2.4.3_Object.prototype.toLocaleString/S15.2.4.3_A13.js b/test/suite/sputnik/Conformance/15_Native/15.2_Object_Objects/15.2.4_Properties_of_the_Object_Prototype_Object/15.2.4.3_Object.prototype.toLocaleString/S15.2.4.3_A13.js new file mode 100644 index 0000000000..8bc052aaad --- /dev/null +++ b/test/suite/sputnik/Conformance/15_Native/15.2_Object_Objects/15.2.4_Properties_of_the_Object_Prototype_Object/15.2.4.3_Object.prototype.toLocaleString/S15.2.4.3_A13.js @@ -0,0 +1,12 @@ +// Copyright 2011 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** +* @name: S15.2.4.3_A13; +* @section: 15.2.4.3; +* @assertion: Let O be the result of calling ToObject passing the this +* value as the argument. +* @negative +*/ + +Object.prototype.toLocaleString.call(null); diff --git a/test/suite/sputnik/Conformance/15_Native/15.2_Object_Objects/15.2.4_Properties_of_the_Object_Prototype_Object/15.2.4.4_Object.prototype.valueOf/S15.2.4.4_A12.js b/test/suite/sputnik/Conformance/15_Native/15.2_Object_Objects/15.2.4_Properties_of_the_Object_Prototype_Object/15.2.4.4_Object.prototype.valueOf/S15.2.4.4_A12.js new file mode 100644 index 0000000000..fa1de95ec6 --- /dev/null +++ b/test/suite/sputnik/Conformance/15_Native/15.2_Object_Objects/15.2.4_Properties_of_the_Object_Prototype_Object/15.2.4.4_Object.prototype.valueOf/S15.2.4.4_A12.js @@ -0,0 +1,12 @@ +// Copyright 2011 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** +* @name: S15.2.4.4_A12; +* @section: 15.2.4.4; +* @assertion: Let O be the result of calling ToObject passing the this +* value as the argument. +* @negative +*/ + +Object.prototype.valueOf.call(undefined); diff --git a/test/suite/sputnik/Conformance/15_Native/15.2_Object_Objects/15.2.4_Properties_of_the_Object_Prototype_Object/15.2.4.4_Object.prototype.valueOf/S15.2.4.4_A13.js b/test/suite/sputnik/Conformance/15_Native/15.2_Object_Objects/15.2.4_Properties_of_the_Object_Prototype_Object/15.2.4.4_Object.prototype.valueOf/S15.2.4.4_A13.js new file mode 100644 index 0000000000..5094fed618 --- /dev/null +++ b/test/suite/sputnik/Conformance/15_Native/15.2_Object_Objects/15.2.4_Properties_of_the_Object_Prototype_Object/15.2.4.4_Object.prototype.valueOf/S15.2.4.4_A13.js @@ -0,0 +1,12 @@ +// Copyright 2011 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** +* @name: S15.2.4.4_A13; +* @section: 15.2.4.4; +* @assertion: Let O be the result of calling ToObject passing the this +* value as the argument. +* @negative +*/ + +Object.prototype.valueOf.call(null); diff --git a/test/suite/sputnik/Conformance/15_Native/15.2_Object_Objects/15.2.4_Properties_of_the_Object_Prototype_Object/15.2.4.4_Object.prototype.valueOf/S15.2.4.4_A14.js b/test/suite/sputnik/Conformance/15_Native/15.2_Object_Objects/15.2.4_Properties_of_the_Object_Prototype_Object/15.2.4.4_Object.prototype.valueOf/S15.2.4.4_A14.js new file mode 100644 index 0000000000..268ae9e879 --- /dev/null +++ b/test/suite/sputnik/Conformance/15_Native/15.2_Object_Objects/15.2.4_Properties_of_the_Object_Prototype_Object/15.2.4.4_Object.prototype.valueOf/S15.2.4.4_A14.js @@ -0,0 +1,12 @@ +// Copyright 2011 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** +* @name: S15.2.4.4_A14; +* @section: 15.2.4.4; +* @assertion: Let O be the result of calling ToObject passing the this +* value as the argument. +* @negative +*/ + +(1,Object.prototype.valueOf)(); diff --git a/test/suite/sputnik/Conformance/15_Native/15.2_Object_Objects/15.2.4_Properties_of_the_Object_Prototype_Object/15.2.4.5_Object.prototype.hasOwnProperty/S15.2.4.5_A12.js b/test/suite/sputnik/Conformance/15_Native/15.2_Object_Objects/15.2.4_Properties_of_the_Object_Prototype_Object/15.2.4.5_Object.prototype.hasOwnProperty/S15.2.4.5_A12.js new file mode 100644 index 0000000000..3211141503 --- /dev/null +++ b/test/suite/sputnik/Conformance/15_Native/15.2_Object_Objects/15.2.4_Properties_of_the_Object_Prototype_Object/15.2.4.5_Object.prototype.hasOwnProperty/S15.2.4.5_A12.js @@ -0,0 +1,12 @@ +// Copyright 2011 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** +* @name: S15.2.4.5_A12; +* @section: 15.2.4.5; +* @assertion: Let O be the result of calling ToObject passing the this +* value as the argument. +* @negative +*/ + +Object.prototype.hasOwnProperty.call(undefined, 'foo'); diff --git a/test/suite/sputnik/Conformance/15_Native/15.2_Object_Objects/15.2.4_Properties_of_the_Object_Prototype_Object/15.2.4.5_Object.prototype.hasOwnProperty/S15.2.4.5_A13.js b/test/suite/sputnik/Conformance/15_Native/15.2_Object_Objects/15.2.4_Properties_of_the_Object_Prototype_Object/15.2.4.5_Object.prototype.hasOwnProperty/S15.2.4.5_A13.js new file mode 100644 index 0000000000..42a8861c0e --- /dev/null +++ b/test/suite/sputnik/Conformance/15_Native/15.2_Object_Objects/15.2.4_Properties_of_the_Object_Prototype_Object/15.2.4.5_Object.prototype.hasOwnProperty/S15.2.4.5_A13.js @@ -0,0 +1,12 @@ +// Copyright 2011 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** +* @name: S15.2.4.5_A13; +* @section: 15.2.4.5; +* @assertion: Let O be the result of calling ToObject passing the this +* value as the argument. +* @negative +*/ + +Object.prototype.hasOwnProperty.call(null, 'foo'); diff --git a/test/suite/sputnik/Conformance/15_Native/15.2_Object_Objects/15.2.4_Properties_of_the_Object_Prototype_Object/15.2.4.6_Object.prototype.isPrototypeOf/S15.2.4.6_A12.js b/test/suite/sputnik/Conformance/15_Native/15.2_Object_Objects/15.2.4_Properties_of_the_Object_Prototype_Object/15.2.4.6_Object.prototype.isPrototypeOf/S15.2.4.6_A12.js new file mode 100644 index 0000000000..8572d61fa3 --- /dev/null +++ b/test/suite/sputnik/Conformance/15_Native/15.2_Object_Objects/15.2.4_Properties_of_the_Object_Prototype_Object/15.2.4.6_Object.prototype.isPrototypeOf/S15.2.4.6_A12.js @@ -0,0 +1,12 @@ +// Copyright 2011 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** +* @name: S15.2.4.6_A12; +* @section: 15.2.4.6; +* @assertion: Let O be the result of calling ToObject passing the this +* value as the argument. +* @negative +*/ + +Object.prototype.isPrototypeOf.call(undefined, {}); diff --git a/test/suite/sputnik/Conformance/15_Native/15.2_Object_Objects/15.2.4_Properties_of_the_Object_Prototype_Object/15.2.4.6_Object.prototype.isPrototypeOf/S15.2.4.6_A13.js b/test/suite/sputnik/Conformance/15_Native/15.2_Object_Objects/15.2.4_Properties_of_the_Object_Prototype_Object/15.2.4.6_Object.prototype.isPrototypeOf/S15.2.4.6_A13.js new file mode 100644 index 0000000000..d12da2aaa9 --- /dev/null +++ b/test/suite/sputnik/Conformance/15_Native/15.2_Object_Objects/15.2.4_Properties_of_the_Object_Prototype_Object/15.2.4.6_Object.prototype.isPrototypeOf/S15.2.4.6_A13.js @@ -0,0 +1,12 @@ +// Copyright 2011 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** +* @name: S15.2.4.6_A13; +* @section: 15.2.4.6; +* @assertion: Let O be the result of calling ToObject passing the this +* value as the argument. +* @negative +*/ + +Object.prototype.isPrototypeOf.call(null, {}); diff --git a/test/suite/sputnik/Conformance/15_Native/15.2_Object_Objects/15.2.4_Properties_of_the_Object_Prototype_Object/15.2.4.7_Object.prototype.propertyIsEnumerable/S15.2.4.7_A12.js b/test/suite/sputnik/Conformance/15_Native/15.2_Object_Objects/15.2.4_Properties_of_the_Object_Prototype_Object/15.2.4.7_Object.prototype.propertyIsEnumerable/S15.2.4.7_A12.js new file mode 100644 index 0000000000..71f73443ee --- /dev/null +++ b/test/suite/sputnik/Conformance/15_Native/15.2_Object_Objects/15.2.4_Properties_of_the_Object_Prototype_Object/15.2.4.7_Object.prototype.propertyIsEnumerable/S15.2.4.7_A12.js @@ -0,0 +1,12 @@ +// Copyright 2011 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** +* @name: S15.2.4.7_A12; +* @section: 15.2.4.7; +* @assertion: Let O be the result of calling ToObject passing the this +* value as the argument. +* @negative +*/ + +Object.prototype.propertyIsEnumerable.call(undefined, 'foo'); diff --git a/test/suite/sputnik/Conformance/15_Native/15.2_Object_Objects/15.2.4_Properties_of_the_Object_Prototype_Object/15.2.4.7_Object.prototype.propertyIsEnumerable/S15.2.4.7_A13.js b/test/suite/sputnik/Conformance/15_Native/15.2_Object_Objects/15.2.4_Properties_of_the_Object_Prototype_Object/15.2.4.7_Object.prototype.propertyIsEnumerable/S15.2.4.7_A13.js new file mode 100644 index 0000000000..ee855bdd16 --- /dev/null +++ b/test/suite/sputnik/Conformance/15_Native/15.2_Object_Objects/15.2.4_Properties_of_the_Object_Prototype_Object/15.2.4.7_Object.prototype.propertyIsEnumerable/S15.2.4.7_A13.js @@ -0,0 +1,12 @@ +// Copyright 2011 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** +* @name: S15.2.4.7_A13; +* @section: 15.2.4.7; +* @assertion: Let O be the result of calling ToObject passing the this +* value as the argument. +* @negative +*/ + +Object.prototype.propertyIsEnumerable.call(null, 'foo'); diff --git a/test/suite/sputnik/Conformance/15_Native/15.3_Function_Objects/15.3.4_Properties_of_the_Function_Prototype_Object/15.3.4.2_Function.prototype.toString/S15.3.4.2_A10.js b/test/suite/sputnik/Conformance/15_Native/15.3_Function_Objects/15.3.4_Properties_of_the_Function_Prototype_Object/15.3.4.2_Function.prototype.toString/S15.3.4.2_A10.js index 9fc6c93944..f44729e95a 100644 --- a/test/suite/sputnik/Conformance/15_Native/15.3_Function_Objects/15.3.4_Properties_of_the_Function_Prototype_Object/15.3.4.2_Function.prototype.toString/S15.3.4.2_A10.js +++ b/test/suite/sputnik/Conformance/15_Native/15.3_Function_Objects/15.3.4_Properties_of_the_Function_Prototype_Object/15.3.4.2_Function.prototype.toString/S15.3.4.2_A10.js @@ -1,23 +1,23 @@ -// Copyright 2009 the Sputnik authors. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/** -* @name: S15.3.4.2_A10; -* @section: 15.3.4.2; -* @assertion: The Function.prototype.toString.length property has the attribute ReadOnly; -* @description: Checking if varying the Function.prototype.toString.length property fails; -*/ - -//CHECK#1 -if (!(Function.prototype.toString.hasOwnProperty('length'))) { - $FAIL('#1: the Function.prototype.toString has length property.'); -} - -obj = Function.prototype.toString.length; - -Function.prototype.toString.length = function(){return "shifted";}; - -//CHECK#2 -if (Function.prototype.toString.length !== obj) { - $ERROR('#2: the Function.prototype.toString length property has the attributes ReadOnly.'); -} +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** +* @name: S15.3.4.2_A10; +* @section: 15.3.4.2; +* @assertion: The Function.prototype.toString.length property has the attribute ReadOnly; +* @description: Checking if varying the Function.prototype.toString.length property fails; +*/ + +//CHECK#1 +if (!(Function.prototype.toString.hasOwnProperty('length'))) { + $FAIL('#1: the Function.prototype.toString has length property.'); +} + +var obj = Function.prototype.toString.length; + +Function.prototype.toString.length = function(){return "shifted";}; + +//CHECK#2 +if (Function.prototype.toString.length !== obj) { + $ERROR('#2: the Function.prototype.toString length property has the attributes ReadOnly.'); +} diff --git a/test/suite/sputnik/Conformance/15_Native/15.3_Function_Objects/15.3.4_Properties_of_the_Function_Prototype_Object/15.3.4.2_Function.prototype.toString/S15.3.4.2_A12.js b/test/suite/sputnik/Conformance/15_Native/15.3_Function_Objects/15.3.4_Properties_of_the_Function_Prototype_Object/15.3.4.2_Function.prototype.toString/S15.3.4.2_A12.js new file mode 100644 index 0000000000..6c26bd6a86 --- /dev/null +++ b/test/suite/sputnik/Conformance/15_Native/15.3_Function_Objects/15.3.4_Properties_of_the_Function_Prototype_Object/15.3.4.2_Function.prototype.toString/S15.3.4.2_A12.js @@ -0,0 +1,13 @@ +// Copyright 2011 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** +* @name: S15.3.4.2_A12; +* @section: 15.3.4.2; +* @assertion: The Function.prototype.toString function is not generic; +* it throws a TypeError exception if its this value is not +* a Function object. +* @negative TypeError; +*/ + +Function.prototype.toString.call(undefined); diff --git a/test/suite/sputnik/Conformance/15_Native/15.3_Function_Objects/15.3.4_Properties_of_the_Function_Prototype_Object/15.3.4.2_Function.prototype.toString/S15.3.4.2_A13.js b/test/suite/sputnik/Conformance/15_Native/15.3_Function_Objects/15.3.4_Properties_of_the_Function_Prototype_Object/15.3.4.2_Function.prototype.toString/S15.3.4.2_A13.js new file mode 100644 index 0000000000..32a3913021 --- /dev/null +++ b/test/suite/sputnik/Conformance/15_Native/15.3_Function_Objects/15.3.4_Properties_of_the_Function_Prototype_Object/15.3.4.2_Function.prototype.toString/S15.3.4.2_A13.js @@ -0,0 +1,13 @@ +// Copyright 2011 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** +* @name: S15.3.4.2_A13; +* @section: 15.3.4.2; +* @assertion: The toString function is not generic; it throws a +* TypeError exception if its this value is not a Function +* object. +* @negative TypeError; +*/ + +Function.prototype.toString.call(null); diff --git a/test/suite/sputnik/Conformance/15_Native/15.3_Function_Objects/15.3.4_Properties_of_the_Function_Prototype_Object/15.3.4.2_Function.prototype.toString/S15.3.4.2_A14.js b/test/suite/sputnik/Conformance/15_Native/15.3_Function_Objects/15.3.4_Properties_of_the_Function_Prototype_Object/15.3.4.2_Function.prototype.toString/S15.3.4.2_A14.js new file mode 100644 index 0000000000..8ff48e6de5 --- /dev/null +++ b/test/suite/sputnik/Conformance/15_Native/15.3_Function_Objects/15.3.4_Properties_of_the_Function_Prototype_Object/15.3.4.2_Function.prototype.toString/S15.3.4.2_A14.js @@ -0,0 +1,13 @@ +// Copyright 2011 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** +* @name: S15.3.4.2_A14; +* @section: 15.3.4.2; +* @assertion: The toString function is not generic; it throws a +* TypeError exception if its this value is not a Function +* object. +* @negative TypeError; +*/ + +Function.prototype.toString.call({}); diff --git a/test/suite/sputnik/Conformance/15_Native/15.3_Function_Objects/15.3.4_Properties_of_the_Function_Prototype_Object/15.3.4.2_Function.prototype.toString/S15.3.4.2_A15.js b/test/suite/sputnik/Conformance/15_Native/15.3_Function_Objects/15.3.4_Properties_of_the_Function_Prototype_Object/15.3.4.2_Function.prototype.toString/S15.3.4.2_A15.js new file mode 100644 index 0000000000..4dbd359284 --- /dev/null +++ b/test/suite/sputnik/Conformance/15_Native/15.3_Function_Objects/15.3.4_Properties_of_the_Function_Prototype_Object/15.3.4.2_Function.prototype.toString/S15.3.4.2_A15.js @@ -0,0 +1,16 @@ +// Copyright 2011 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** +* @name: S15.3.4.2_A15; +* @section: 15.3.4.2; +* @assertion: The toString function is not generic; it throws a +* TypeError exception if its this value is not a Function +* object. +* @description: Whether or not they are callable, RegExp objects are +* not Function objects, so toString should throw a +* TypeError. +* @negative TypeError; +*/ + +Function.prototype.toString.call(/x/); diff --git a/test/suite/sputnik/Conformance/15_Native/15.3_Function_Objects/15.3.4_Properties_of_the_Function_Prototype_Object/15.3.4.2_Function.prototype.toString/S15.3.4.2_A16.js b/test/suite/sputnik/Conformance/15_Native/15.3_Function_Objects/15.3.4_Properties_of_the_Function_Prototype_Object/15.3.4.2_Function.prototype.toString/S15.3.4.2_A16.js new file mode 100644 index 0000000000..6a51b0ceee --- /dev/null +++ b/test/suite/sputnik/Conformance/15_Native/15.3_Function_Objects/15.3.4_Properties_of_the_Function_Prototype_Object/15.3.4.2_Function.prototype.toString/S15.3.4.2_A16.js @@ -0,0 +1,18 @@ +// Copyright 2011 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** +* @name: S15.3.4.2_A16; +* @section: 15.3.4.2; +* @assertion: The toString function is not generic; it throws a +* TypeError exception if its this value is not a Function +* object. +* @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; +*/ + +var obj = {toString: Function.prototype.toString}; + +String(obj); diff --git a/test/suite/sputnik/Conformance/15_Native/15.3_Function_Objects/15.3.4_Properties_of_the_Function_Prototype_Object/15.3.4.2_Function.prototype.toString/S15.3.4.2_A1_T1.js b/test/suite/sputnik/Conformance/15_Native/15.3_Function_Objects/15.3.4_Properties_of_the_Function_Prototype_Object/15.3.4.2_Function.prototype.toString/S15.3.4.2_A1_T1.js index 9e14063d15..7cc0d5bf86 100644 --- a/test/suite/sputnik/Conformance/15_Native/15.3_Function_Objects/15.3.4_Properties_of_the_Function_Prototype_Object/15.3.4.2_Function.prototype.toString/S15.3.4.2_A1_T1.js +++ b/test/suite/sputnik/Conformance/15_Native/15.3_Function_Objects/15.3.4_Properties_of_the_Function_Prototype_Object/15.3.4.2_Function.prototype.toString/S15.3.4.2_A1_T1.js @@ -1,18 +1,18 @@ -// Copyright 2009 the Sputnik authors. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/** -* @name: S15.3.4.2_A1_T1; -* @section: 15.3.4.2; -* @assertion: An implementation-dependent representation of the function is returned. This representation has the syntax of a FunctionDeclaration; -* @description: For testing use Function.prototype.toString() function; -*/ - -f = function(x) { - return x*x; -} - -//CHECK#1 -if (eval(f.toString())(10) !== f(10)) { - $ERROR('#1: An implementation-dependent representation of the function is returned. This representation has the syntax of a FunctionDeclaration'); -} +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** +* @name: S15.3.4.2_A1_T1; +* @section: 15.3.4.2; +* @assertion: An implementation-dependent representation of the function is returned. This representation has the syntax of a FunctionDeclaration; +* @description: For testing use Function.prototype.toString() function; +*/ + +var f = function(x) { + return x*x; +}; + +//CHECK#1 +if (eval(f.toString())(10) !== f(10)) { + $ERROR('#1: An implementation-dependent representation of the function is returned. This representation has the syntax of a FunctionDeclaration'); +} diff --git a/test/suite/sputnik/Conformance/15_Native/15.3_Function_Objects/15.3.4_Properties_of_the_Function_Prototype_Object/15.3.4.3_Function.prototype.apply/S15.3.4.3_A13.js b/test/suite/sputnik/Conformance/15_Native/15.3_Function_Objects/15.3.4_Properties_of_the_Function_Prototype_Object/15.3.4.3_Function.prototype.apply/S15.3.4.3_A13.js new file mode 100644 index 0000000000..01196f9a0c --- /dev/null +++ b/test/suite/sputnik/Conformance/15_Native/15.3_Function_Objects/15.3.4_Properties_of_the_Function_Prototype_Object/15.3.4.3_Function.prototype.apply/S15.3.4.3_A13.js @@ -0,0 +1,11 @@ +// Copyright 2011 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** +* @name: S15.3.4.3_A13; +* @section: 15.3.4.3; +* @assertion: If IsCallable(func) is false, then throw a TypeError exception. +* @negative TypeError; +*/ + +Function.prototype.apply.call(undefined, {}, []); diff --git a/test/suite/sputnik/Conformance/15_Native/15.3_Function_Objects/15.3.4_Properties_of_the_Function_Prototype_Object/15.3.4.3_Function.prototype.apply/S15.3.4.3_A14.js b/test/suite/sputnik/Conformance/15_Native/15.3_Function_Objects/15.3.4_Properties_of_the_Function_Prototype_Object/15.3.4.3_Function.prototype.apply/S15.3.4.3_A14.js new file mode 100644 index 0000000000..c756e4c41b --- /dev/null +++ b/test/suite/sputnik/Conformance/15_Native/15.3_Function_Objects/15.3.4_Properties_of_the_Function_Prototype_Object/15.3.4.3_Function.prototype.apply/S15.3.4.3_A14.js @@ -0,0 +1,11 @@ +// Copyright 2011 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** +* @name: S15.3.4.3_A14; +* @section: 15.3.4.3; +* @assertion: If IsCallable(func) is false, then throw a TypeError exception. +* @negative TypeError; +*/ + +Function.prototype.apply.call(null, {}, []); diff --git a/test/suite/sputnik/Conformance/15_Native/15.3_Function_Objects/15.3.4_Properties_of_the_Function_Prototype_Object/15.3.4.3_Function.prototype.apply/S15.3.4.3_A15.js b/test/suite/sputnik/Conformance/15_Native/15.3_Function_Objects/15.3.4_Properties_of_the_Function_Prototype_Object/15.3.4.3_Function.prototype.apply/S15.3.4.3_A15.js new file mode 100644 index 0000000000..339d446898 --- /dev/null +++ b/test/suite/sputnik/Conformance/15_Native/15.3_Function_Objects/15.3.4_Properties_of_the_Function_Prototype_Object/15.3.4.3_Function.prototype.apply/S15.3.4.3_A15.js @@ -0,0 +1,11 @@ +// Copyright 2011 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** +* @name: S15.3.4.3_A15; +* @section: 15.3.4.3; +* @assertion: If IsCallable(func) is false, then throw a TypeError exception. +* @negative TypeError; +*/ + +Function.prototype.apply.call({}, {}, []); diff --git a/test/suite/sputnik/Conformance/15_Native/15.3_Function_Objects/15.3.4_Properties_of_the_Function_Prototype_Object/15.3.4.3_Function.prototype.apply/S15.3.4.3_A16.js b/test/suite/sputnik/Conformance/15_Native/15.3_Function_Objects/15.3.4_Properties_of_the_Function_Prototype_Object/15.3.4.3_Function.prototype.apply/S15.3.4.3_A16.js new file mode 100644 index 0000000000..08425ed709 --- /dev/null +++ b/test/suite/sputnik/Conformance/15_Native/15.3_Function_Objects/15.3.4_Properties_of_the_Function_Prototype_Object/15.3.4.3_Function.prototype.apply/S15.3.4.3_A16.js @@ -0,0 +1,27 @@ +// Copyright 2011 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** +* @name: S15.3.4.3_A16; +* @section: 15.3.4.3; +* @assertion: If IsCallable(func) is false, then throw a TypeError exception. +* @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. +*/ + +var re = (/x/); +if (typeof re === 'function') { + Function.prototype.apply.call(re, undefined, ['x']); +} else { + try { + Function.prototype.bind.call(re, undefined); + $FAIL('#1: If IsCallable(func) is false, ' + + 'then (bind should) throw a TypeError exception'); + } catch (e) { + if (!(e instanceof TypeError)) { + $ERROR('#1: TypeError expected. Actual: ' + e); + } + } +} diff --git a/test/suite/sputnik/Conformance/15_Native/15.3_Function_Objects/15.3.4_Properties_of_the_Function_Prototype_Object/15.3.4.4_Function.prototype.call/S15.3.4.4_A13.js b/test/suite/sputnik/Conformance/15_Native/15.3_Function_Objects/15.3.4_Properties_of_the_Function_Prototype_Object/15.3.4.4_Function.prototype.call/S15.3.4.4_A13.js new file mode 100644 index 0000000000..6dcf1f9607 --- /dev/null +++ b/test/suite/sputnik/Conformance/15_Native/15.3_Function_Objects/15.3.4_Properties_of_the_Function_Prototype_Object/15.3.4.4_Function.prototype.call/S15.3.4.4_A13.js @@ -0,0 +1,11 @@ +// Copyright 2011 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** +* @name: S15.3.4.4_A13; +* @section: 15.3.4.4; +* @assertion: If IsCallable(func) is false, then throw a TypeError exception. +* @negative TypeError; +*/ + +Function.prototype.call.call(undefined, {}); diff --git a/test/suite/sputnik/Conformance/15_Native/15.3_Function_Objects/15.3.4_Properties_of_the_Function_Prototype_Object/15.3.4.4_Function.prototype.call/S15.3.4.4_A14.js b/test/suite/sputnik/Conformance/15_Native/15.3_Function_Objects/15.3.4_Properties_of_the_Function_Prototype_Object/15.3.4.4_Function.prototype.call/S15.3.4.4_A14.js new file mode 100644 index 0000000000..88a8ae002d --- /dev/null +++ b/test/suite/sputnik/Conformance/15_Native/15.3_Function_Objects/15.3.4_Properties_of_the_Function_Prototype_Object/15.3.4.4_Function.prototype.call/S15.3.4.4_A14.js @@ -0,0 +1,11 @@ +// Copyright 2011 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** +* @name: S15.3.4.4_A14; +* @section: 15.3.4.4; +* @assertion: If IsCallable(func) is false, then throw a TypeError exception. +* @negative TypeError; +*/ + +Function.prototype.call.call(null, {}); diff --git a/test/suite/sputnik/Conformance/15_Native/15.3_Function_Objects/15.3.4_Properties_of_the_Function_Prototype_Object/15.3.4.4_Function.prototype.call/S15.3.4.4_A15.js b/test/suite/sputnik/Conformance/15_Native/15.3_Function_Objects/15.3.4_Properties_of_the_Function_Prototype_Object/15.3.4.4_Function.prototype.call/S15.3.4.4_A15.js new file mode 100644 index 0000000000..d337793eb4 --- /dev/null +++ b/test/suite/sputnik/Conformance/15_Native/15.3_Function_Objects/15.3.4_Properties_of_the_Function_Prototype_Object/15.3.4.4_Function.prototype.call/S15.3.4.4_A15.js @@ -0,0 +1,11 @@ +// Copyright 2011 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** +* @name: S15.3.4.4_A15; +* @section: 15.3.4.4; +* @assertion: If IsCallable(func) is false, then throw a TypeError exception. +* @negative TypeError; +*/ + +Function.prototype.call.call({}, {}); diff --git a/test/suite/sputnik/Conformance/15_Native/15.3_Function_Objects/15.3.4_Properties_of_the_Function_Prototype_Object/15.3.4.4_Function.prototype.call/S15.3.4.4_A16.js b/test/suite/sputnik/Conformance/15_Native/15.3_Function_Objects/15.3.4_Properties_of_the_Function_Prototype_Object/15.3.4.4_Function.prototype.call/S15.3.4.4_A16.js new file mode 100644 index 0000000000..2333f4ec4a --- /dev/null +++ b/test/suite/sputnik/Conformance/15_Native/15.3_Function_Objects/15.3.4_Properties_of_the_Function_Prototype_Object/15.3.4.4_Function.prototype.call/S15.3.4.4_A16.js @@ -0,0 +1,27 @@ +// Copyright 2011 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** +* @name: S15.3.4.4_A16; +* @section: 15.3.4.4; +* @assertion: If IsCallable(func) is false, then throw a TypeError exception. +* @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. +*/ + +var re = (/x/); +if (typeof re === 'function') { + Function.prototype.call.call(re, undefined, 'x'); +} else { + try { + Function.prototype.bind.call(re, undefined); + $FAIL('#1: If IsCallable(func) is false, ' + + 'then (bind should) throw a TypeError exception'); + } catch (e) { + if (!(e instanceof TypeError)) { + $ERROR('#1: TypeError expected. Actual: ' + e); + } + } +} diff --git a/test/suite/sputnik/Conformance/15_Native/15.3_Function_Objects/15.3.4_Properties_of_the_Function_Prototype_Object/15.3.4.5_Function.prototype.bind/S15.3.4.5_A1.js b/test/suite/sputnik/Conformance/15_Native/15.3_Function_Objects/15.3.4_Properties_of_the_Function_Prototype_Object/15.3.4.5_Function.prototype.bind/S15.3.4.5_A1.js new file mode 100644 index 0000000000..c58334ba2a --- /dev/null +++ b/test/suite/sputnik/Conformance/15_Native/15.3_Function_Objects/15.3.4_Properties_of_the_Function_Prototype_Object/15.3.4.5_Function.prototype.bind/S15.3.4.5_A1.js @@ -0,0 +1,15 @@ +// Copyright 2011 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** +* @name: S15.3.4.5_A1; +* @section: 15.3.4.5; +* @assertion: "caller" of bound function is poisoned (step 20); +* @description A bound function should fail to find its "caller"; +* @negative TypeError; +*/ + +function foo() { return bar.caller; } +var bar = foo.bind({}); +function baz() { return bar(); } +baz(); diff --git a/test/suite/sputnik/Conformance/15_Native/15.3_Function_Objects/15.3.4_Properties_of_the_Function_Prototype_Object/15.3.4.5_Function.prototype.bind/S15.3.4.5_A13.js b/test/suite/sputnik/Conformance/15_Native/15.3_Function_Objects/15.3.4_Properties_of_the_Function_Prototype_Object/15.3.4.5_Function.prototype.bind/S15.3.4.5_A13.js new file mode 100644 index 0000000000..9b677d8cd8 --- /dev/null +++ b/test/suite/sputnik/Conformance/15_Native/15.3_Function_Objects/15.3.4_Properties_of_the_Function_Prototype_Object/15.3.4.5_Function.prototype.bind/S15.3.4.5_A13.js @@ -0,0 +1,12 @@ +// Copyright 2011 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** +* @name: S15.3.4.5_A13; +* @section: 15.3.4.5; +* @assertion: If IsCallable(func) is false, then throw a TypeError exception. +* @negative TypeError; +*/ + +Function.prototype.bind.call(undefined, {}); + diff --git a/test/suite/sputnik/Conformance/15_Native/15.3_Function_Objects/15.3.4_Properties_of_the_Function_Prototype_Object/15.3.4.5_Function.prototype.bind/S15.3.4.5_A14.js b/test/suite/sputnik/Conformance/15_Native/15.3_Function_Objects/15.3.4_Properties_of_the_Function_Prototype_Object/15.3.4.5_Function.prototype.bind/S15.3.4.5_A14.js new file mode 100644 index 0000000000..f3b209f24b --- /dev/null +++ b/test/suite/sputnik/Conformance/15_Native/15.3_Function_Objects/15.3.4_Properties_of_the_Function_Prototype_Object/15.3.4.5_Function.prototype.bind/S15.3.4.5_A14.js @@ -0,0 +1,12 @@ +// Copyright 2011 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** +* @name: S15.3.4.5_A14; +* @section: 15.3.4.5; +* @assertion: If IsCallable(func) is false, then throw a TypeError exception. +* @negative TypeError; +*/ + +Function.prototype.bind.call(null, {}); + diff --git a/test/suite/sputnik/Conformance/15_Native/15.3_Function_Objects/15.3.4_Properties_of_the_Function_Prototype_Object/15.3.4.5_Function.prototype.bind/S15.3.4.5_A15.js b/test/suite/sputnik/Conformance/15_Native/15.3_Function_Objects/15.3.4_Properties_of_the_Function_Prototype_Object/15.3.4.5_Function.prototype.bind/S15.3.4.5_A15.js new file mode 100644 index 0000000000..281983a643 --- /dev/null +++ b/test/suite/sputnik/Conformance/15_Native/15.3_Function_Objects/15.3.4_Properties_of_the_Function_Prototype_Object/15.3.4.5_Function.prototype.bind/S15.3.4.5_A15.js @@ -0,0 +1,12 @@ +// Copyright 2011 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** +* @name: S15.3.4.5_A15; +* @section: 15.3.4.5; +* @assertion: If IsCallable(func) is false, then throw a TypeError exception. +* @negative TypeError; +*/ + +Function.prototype.bind.call({}, {}); + diff --git a/test/suite/sputnik/Conformance/15_Native/15.3_Function_Objects/15.3.4_Properties_of_the_Function_Prototype_Object/15.3.4.5_Function.prototype.bind/S15.3.4.5_A16.js b/test/suite/sputnik/Conformance/15_Native/15.3_Function_Objects/15.3.4_Properties_of_the_Function_Prototype_Object/15.3.4.5_Function.prototype.bind/S15.3.4.5_A16.js new file mode 100644 index 0000000000..c0d57b81ac --- /dev/null +++ b/test/suite/sputnik/Conformance/15_Native/15.3_Function_Objects/15.3.4_Properties_of_the_Function_Prototype_Object/15.3.4.5_Function.prototype.bind/S15.3.4.5_A16.js @@ -0,0 +1,27 @@ +// Copyright 2011 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** +* @name: S15.3.4.5_A16; +* @section: 15.3.4.5; +* @assertion: If IsCallable(func) is false, then throw a TypeError exception. +* @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. +*/ + +var re = (/x/); +if (typeof re === 'function') { + Function.prototype.bind.call(re, undefined); +} else { + try { + Function.prototype.bind.call(re, undefined); + $FAIL('#1: If IsCallable(func) is false, ' + + 'then (bind should) throw a TypeError exception'); + } catch (e) { + if (!(e instanceof TypeError)) { + $ERROR('#1: TypeError expected. Actual: ' + e); + } + } +} diff --git a/test/suite/sputnik/Conformance/15_Native/15.3_Function_Objects/15.3.4_Properties_of_the_Function_Prototype_Object/15.3.4.5_Function.prototype.bind/S15.3.4.5_A2.js b/test/suite/sputnik/Conformance/15_Native/15.3_Function_Objects/15.3.4_Properties_of_the_Function_Prototype_Object/15.3.4.5_Function.prototype.bind/S15.3.4.5_A2.js new file mode 100644 index 0000000000..08e3489a5d --- /dev/null +++ b/test/suite/sputnik/Conformance/15_Native/15.3_Function_Objects/15.3.4_Properties_of_the_Function_Prototype_Object/15.3.4.5_Function.prototype.bind/S15.3.4.5_A2.js @@ -0,0 +1,16 @@ +// Copyright 2011 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** +* @name: S15.3.4.5_A1; +* @section: 15.3.4.5; +* @assertion: "arguments" of bound function is poisoned (step 21); +* @description a bound function should fail to find the bound function +* "arguments"; +* @negative TypeError; +*/ + +function foo() { return bar.arguments; } +var bar = foo.bind({}); +function baz() { return bar(); } +baz(); diff --git a/test/suite/sputnik/Conformance/15_Native/15.3_Function_Objects/15.3.4_Properties_of_the_Function_Prototype_Object/S15.3.4_A1.js b/test/suite/sputnik/Conformance/15_Native/15.3_Function_Objects/15.3.4_Properties_of_the_Function_Prototype_Object/S15.3.4_A1.js index cfafdb143d..4f46396488 100644 --- a/test/suite/sputnik/Conformance/15_Native/15.3_Function_Objects/15.3.4_Properties_of_the_Function_Prototype_Object/S15.3.4_A1.js +++ b/test/suite/sputnik/Conformance/15_Native/15.3_Function_Objects/15.3.4_Properties_of_the_Function_Prototype_Object/S15.3.4_A1.js @@ -1,17 +1,15 @@ -// Copyright 2009 the Sputnik authors. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/** -* @name: S15.3.4_A1; -* @section: 15.3.4; -* @assertion: The Function prototype object is itself a Function object (its [[Class]] is "Function"); -* @description: first we delete Function.prototype.toString cause it overrides Object prototype toString. -* Object.prototype.toString returns [object+[[class]]+]; -*/ - -delete Function.prototype.toString; - -//CHECK#1 -if (Function.prototype.toString() !== "[object "+"Function"+"]") { - $ERROR('#1: The Function prototype object is itself a Function object (its [[Class]] is "Function")'); -} +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** +* @name: S15.3.4_A1; +* @section: 15.3.4; +* @assertion: The Function prototype object is itself a Function +* object (its [[Class]] is "Function"); +* @description: Object.prototype.toString returns [object+[[Class]]+]; +*/ + +if (Object.prototype.toString.call(Function.prototype) !== "[object Function]") { + $ERROR('#2: The Function prototype object is itself a Function ' + + 'object (its [[Class]] is "Function") (15.3.4)'); +} diff --git a/test/suite/sputnik/Conformance/15_Native/15.3_Function_Objects/15.3.4_Properties_of_the_Function_Prototype_Object/S15.3.4_A3_T1.js b/test/suite/sputnik/Conformance/15_Native/15.3_Function_Objects/15.3.4_Properties_of_the_Function_Prototype_Object/S15.3.4_A3_T1.js index cde3f50f4a..423bf92f12 100644 --- a/test/suite/sputnik/Conformance/15_Native/15.3_Function_Objects/15.3.4_Properties_of_the_Function_Prototype_Object/S15.3.4_A3_T1.js +++ b/test/suite/sputnik/Conformance/15_Native/15.3_Function_Objects/15.3.4_Properties_of_the_Function_Prototype_Object/S15.3.4_A3_T1.js @@ -1,21 +1,17 @@ -// Copyright 2009 the Sputnik authors. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/** -* @name: S15.3.4_A3_T1; -* @section: 15.3.4, 15.3.2.1; -* @assertion: The value of the internal [[Prototype]] property of the Function prototype object is the Object prototype object (15.3.2.1); -* @description: Checking prototype of Function.prototype; -*/ - -//CHECK#1 -if (!(Object.prototype.isPrototypeOf(Function.prototype))) { - $ERROR('#1: The value of the internal [[Prototype]] property of the Function prototype object is the Object prototype object (15.3.2.1)'); -} - -delete Function.prototype.toString; - -//CHECK#2 -if (Function.prototype.toString() !== "[object "+"Function"+"]") { - $ERROR('#2: The value of the internal [[Prototype]] property of the Function prototype object is the Object prototype object (15.3.2.1)'); -} +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** +* @name: S15.3.4_A3_T1; +* @section: 15.3.4; +* @assertion: The value of the internal [[Prototype]] property of the +* Function prototype object is the Object prototype object +* (15.3.4); +* @description: Checking prototype of Function.prototype; +*/ + +if (Object.getPrototypeOf(Function.prototype) !== Object.prototype) { + $ERROR('#1: The value of the internal [[Prototype]] property of ' + + 'the Function prototype object is the Object prototype ' + + 'object (15.3.4)'); +} diff --git a/test/suite/sputnik/Conformance/15_Native/15.3_Function_Objects/15.3.5_Properties_of_Function_Instances/S15.3.5.1_A1_T1.js b/test/suite/sputnik/Conformance/15_Native/15.3_Function_Objects/15.3.5_Properties_of_Function_Instances/S15.3.5.1_A1_T1.js index 88efb7e45b..9f23a6efce 100644 --- a/test/suite/sputnik/Conformance/15_Native/15.3_Function_Objects/15.3.5_Properties_of_Function_Instances/S15.3.5.1_A1_T1.js +++ b/test/suite/sputnik/Conformance/15_Native/15.3_Function_Objects/15.3.5_Properties_of_Function_Instances/S15.3.5.1_A1_T1.js @@ -1,21 +1,23 @@ -// Copyright 2009 the Sputnik authors. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/** -* @name: S15.3.5.1_A1_T1; -* @section: 15.3.5.1; -* @assertion: The value of the length property is usually an integer that indicates the 'typical' number of arguments expected by the function; -* @description: Checking length property of Function("arg1,arg2,arg3", null); -*/ - -f = new Function("arg1,arg2,arg3", null); - -//CHECK#1 -if (!(f.hasOwnProperty('length'))) { - $FAIL('#1: the function has length property.'); -} - -//CHECK#2 -if (f.length !== 3) { - $ERROR('#2: The value of the length property is usually an integer that indicates the "typical" number of arguments expected by the function'); -} +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** +* @name: S15.3.5.1_A1_T1; +* @section: 15.3.5.1; +* @assertion: The value of the length property is usually an integer +* that indicates the 'typical' number of arguments +* expected by the function; +* @description: Checking length property of Function("arg1,arg2,arg3", null); +*/ + +f = new Function("arg1,arg2,arg3", null); + +//CHECK#1 +if (!(f.hasOwnProperty('length'))) { + $FAIL('#1: the function has length property.'); +} + +//CHECK#2 +if (f.length !== 3) { + $ERROR('#2: The value of the length property is usually an integer that indicates the "typical" number of arguments expected by the function'); +} diff --git a/test/suite/sputnik/Conformance/15_Native/15.3_Function_Objects/15.3.5_Properties_of_Function_Instances/S15.3.5_A1_T1.js b/test/suite/sputnik/Conformance/15_Native/15.3_Function_Objects/15.3.5_Properties_of_Function_Instances/S15.3.5_A1_T1.js index 88a0493d3a..51444367a7 100644 --- a/test/suite/sputnik/Conformance/15_Native/15.3_Function_Objects/15.3.5_Properties_of_Function_Instances/S15.3.5_A1_T1.js +++ b/test/suite/sputnik/Conformance/15_Native/15.3_Function_Objects/15.3.5_Properties_of_Function_Instances/S15.3.5_A1_T1.js @@ -1,20 +1,15 @@ -// Copyright 2009 the Sputnik authors. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/** -* @name: S15.3.5_A1_T1; -* @section: 15.3.5; -* @assertion: The value of the [[Class]] property is "Function" ; -* @description: We delete Function.prototype.toString method to access Object.prototype.toString method. -* For testing use variable f = new Function; -*/ - -f = new Function; - -delete Function.prototype.toString; - -//CHECK#1 -if (f.toString() !== "[object "+"Function"+"]") { - $ERROR('#1: The value of the [[Class]] property is "Function"'); -} - +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** +* @name: S15.3.5_A1_T1; +* @section: 15.3.5; +* @assertion: The value of the [[Class]] property is "Function"; +* @description: For testing use variable f = new Function; +*/ + +var f = new Function; + +if (Object.prototype.toString.call(f) !== "[object Function]") { + $ERROR('#1: The value of the [[Class]] property is "Function"'); +} diff --git a/test/suite/sputnik/Conformance/15_Native/15.3_Function_Objects/15.3.5_Properties_of_Function_Instances/S15.3.5_A1_T2.js b/test/suite/sputnik/Conformance/15_Native/15.3_Function_Objects/15.3.5_Properties_of_Function_Instances/S15.3.5_A1_T2.js index c5165874ba..893dbc3ae1 100644 --- a/test/suite/sputnik/Conformance/15_Native/15.3_Function_Objects/15.3.5_Properties_of_Function_Instances/S15.3.5_A1_T2.js +++ b/test/suite/sputnik/Conformance/15_Native/15.3_Function_Objects/15.3.5_Properties_of_Function_Instances/S15.3.5_A1_T2.js @@ -1,20 +1,16 @@ -// Copyright 2009 the Sputnik authors. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/** -* @name: S15.3.5_A1_T2; -* @section: 15.3.5; -* @assertion: The value of the [[Class]] property is "Function" ; -* @description: We delete Function.prototype.toString method to access Object.prototype.toString method -* For testing use variable f = Function(); -*/ - -f = Function(); - -delete Function.prototype.toString; - -//CHECK#1 -if (f.toString() !== "[object "+"Function"+"]") { - $ERROR('#1: The value of the [[Class]] property is "Function"'); -} - +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** +* @name: S15.3.5_A1_T2; +* @section: 15.3.5; +* @assertion: The value of the [[Class]] property is "Function" ; +* @description: For testing use variable f = Function(); +*/ + +var f = Function(); + +if (Object.prototype.toString.call(f) !== "[object Function]") { + $ERROR('#1: The value of the [[Class]] property is "Function"'); +} + diff --git a/test/suite/sputnik/Conformance/15_Native/15.4_Array_Objects/15.4.4_Properties_of_the_Array_Prototype_Object/15.4.4.11_Array_prototype_sort/S15.4.4.11_A8.js b/test/suite/sputnik/Conformance/15_Native/15.4_Array_Objects/15.4.4_Properties_of_the_Array_Prototype_Object/15.4.4.11_Array_prototype_sort/S15.4.4.11_A8.js new file mode 100644 index 0000000000..b32842a7b9 --- /dev/null +++ b/test/suite/sputnik/Conformance/15_Native/15.4_Array_Objects/15.4.4_Properties_of_the_Array_Prototype_Object/15.4.4.11_Array_prototype_sort/S15.4.4.11_A8.js @@ -0,0 +1,24 @@ +// Copyright 2011 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** +* @name: S15.4.4.11_A8; +* @section: 15.4.4.11; +* @assertion: Call the comparefn passing undefined as the this value +* (step 13b); +* @description: comparefn tests that its this value is undefined; +*/ + +var global = this; +[2,3].sort(function(x,y) { + "use strict"; + + if (this === global) { + $FAIL('#1: Sort leaks global'); + } + if (this !== undefined) { + $FAIL('#2: Sort comparefn should be called with this===undefined. ' + + 'Actual: ' + this); + } + return x - y; +}); diff --git a/test/suite/sputnik/Conformance/15_Native/15.4_Array_Objects/15.4.4_Properties_of_the_Array_Prototype_Object/15.4.4.18_Array_prototype_forEach/S15.4.4.18_A1.js b/test/suite/sputnik/Conformance/15_Native/15.4_Array_Objects/15.4.4_Properties_of_the_Array_Prototype_Object/15.4.4.18_Array_prototype_forEach/S15.4.4.18_A1.js new file mode 100644 index 0000000000..8497a0cdcb --- /dev/null +++ b/test/suite/sputnik/Conformance/15_Native/15.4_Array_Objects/15.4.4_Properties_of_the_Array_Prototype_Object/15.4.4.18_Array_prototype_forEach/S15.4.4.18_A1.js @@ -0,0 +1,11 @@ +// Copyright 2011 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * @name: S15.4.4.18_A1; + * @section: 15.4.4.18; + * @assertion: array.forEach can be frozen while in progress + * @description: Freezes array.forEach during a forEach to see if it works +*/ + +['z'].forEach(function(){ Object.freeze(Array.prototype.forEach); }); diff --git a/test/suite/sputnik/Conformance/15_Native/15.4_Array_Objects/15.4.4_Properties_of_the_Array_Prototype_Object/15.4.4.18_Array_prototype_forEach/S15.4.4.18_A2.js b/test/suite/sputnik/Conformance/15_Native/15.4_Array_Objects/15.4.4_Properties_of_the_Array_Prototype_Object/15.4.4.18_Array_prototype_forEach/S15.4.4.18_A2.js new file mode 100644 index 0000000000..e22dc1fbf7 --- /dev/null +++ b/test/suite/sputnik/Conformance/15_Native/15.4_Array_Objects/15.4.4_Properties_of_the_Array_Prototype_Object/15.4.4.18_Array_prototype_forEach/S15.4.4.18_A2.js @@ -0,0 +1,14 @@ +// Copyright 2011 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * @name: S15.4.4.18_A2; + * @section: 15.4.4.18; + * @assertion: array.forEach can be frozen while in progress + * @description: Freezes array.forEach during a forEach to see if it works +*/ + +function foo() { + ['z'].forEach(function(){ Object.freeze(Array.prototype.forEach); }); +} +foo(); diff --git a/test/suite/sputnik/Conformance/15_Native/15.4_Array_Objects/15.4.4_Properties_of_the_Array_Prototype_Object/S15.4.4_A1.1_T2.js b/test/suite/sputnik/Conformance/15_Native/15.4_Array_Objects/15.4.4_Properties_of_the_Array_Prototype_Object/S15.4.4_A1.1_T2.js index 259509ecdd..e038e553de 100644 --- a/test/suite/sputnik/Conformance/15_Native/15.4_Array_Objects/15.4.4_Properties_of_the_Array_Prototype_Object/S15.4.4_A1.1_T2.js +++ b/test/suite/sputnik/Conformance/15_Native/15.4_Array_Objects/15.4.4_Properties_of_the_Array_Prototype_Object/S15.4.4_A1.1_T2.js @@ -1,17 +1,15 @@ -// Copyright 2009 the Sputnik authors. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/** - * @name: S15.4.4_A1.1_T2; - * @section: 15.4.4, 11.4.1; - * @assertion: The value of the internal [[Prototype]] property of - * the Array prototype object is the Object prototype object; - * @description: delete Array.prototype.toString; - * @strict_mode_negative -*/ - -//CHECK#1 -delete Array.prototype.toString; -if (Array.prototype.toString() !== "[object " + "Array" + "]") { - $ERROR('#1: delete Array.prototype.toString; var Array.prototype = Object(); Array.prototype.toString() === "[object " + "Array" + "]". Actual: ' + (Array.prototype.toString())); -} +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * @name: S15.4.4_A1.1_T2; + * @section: 15.4.4; + * @assertion:The Array prototype object is itself an array; its +* [[Class]] is "Array", +*/ + +//CHECK#1 +if (Object.prototype.toString.call(Array.prototype) !== "[object Array]") { + $ERROR('The Array prototype object is itself an array; its' + + '[[Class]] is "Array".'); +} diff --git a/test/suite/sputnik/Conformance/15_Native/15.5_String_Objects/15.5.4_Properties_of_the_String_Prototype_Object/15.5.4.11_String.prototype.replace/S15.5.4.11_A12.js b/test/suite/sputnik/Conformance/15_Native/15.5_String_Objects/15.5.4_Properties_of_the_String_Prototype_Object/15.5.4.11_String.prototype.replace/S15.5.4.11_A12.js new file mode 100644 index 0000000000..bfc32db705 --- /dev/null +++ b/test/suite/sputnik/Conformance/15_Native/15.5_String_Objects/15.5.4_Properties_of_the_String_Prototype_Object/15.5.4.11_String.prototype.replace/S15.5.4.11_A12.js @@ -0,0 +1,23 @@ +// Copyright 2011 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** +* @name: S15.5.4.11_A12; +* @section: 15.5.4.11; +* @assertion: Call replaceValue passing undefined as the this value; +* @description: replaceValue tests that its this value is undefined; +*/ + +var global = this; +'x'.replace(/x/, function() { + "use strict"; + + if (this === global) { + $FAIL('#1: String replace leaks global'); + } + if (this !== undefined) { + $FAIL('#2: replaceValue should be called with this===undefined. ' + + 'Actual: ' + this); + } + return 'y'; +}); diff --git a/test/suite/sputnik/Conformance/15_Native/15.5_String_Objects/15.5.4_Properties_of_the_String_Prototype_Object/15.5.4.8_String.prototype.lastIndexOf/S15.5.4.8_A1_T1.js b/test/suite/sputnik/Conformance/15_Native/15.5_String_Objects/15.5.4_Properties_of_the_String_Prototype_Object/15.5.4.8_String.prototype.lastIndexOf/S15.5.4.8_A1_T1.js index c36c8847be..36b70ebd28 100644 --- a/test/suite/sputnik/Conformance/15_Native/15.5_String_Objects/15.5.4_Properties_of_the_String_Prototype_Object/15.5.4.8_String.prototype.lastIndexOf/S15.5.4.8_A1_T1.js +++ b/test/suite/sputnik/Conformance/15_Native/15.5_String_Objects/15.5.4_Properties_of_the_String_Prototype_Object/15.5.4.8_String.prototype.lastIndexOf/S15.5.4.8_A1_T1.js @@ -1,24 +1,21 @@ -// Copyright 2009 the Sputnik authors. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/** -* @name: S15.5.4.8_A1_T1; -* @section: 15.5.4.8; -* @assertion: String.prototype.lastIndexOf(searchString, position); -* @description: Arguments are false and true, and instance is object; -*/ - -var __instance = new Object(true); - -//Test262 Change -//var __instance.lastIndexOf = String.prototype.lastIndexOf; -__instance.lastIndexOf = String.prototype.lastIndexOf; - - -////////////////////////////////////////////////////////////////////////////// -//CHECK#1 -if (__instance.lastIndexOf(true, false) !== 0) { - $ERROR('#1: __instance = new Object(true); __instance.lastIndexOf = String.prototype.lastIndexOf; __instance.lastIndexOf(true, false) === 0. Actual: '+__instance.lastIndexOf(true, false) ); -} -// -////////////////////////////////////////////////////////////////////////////// +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** +* @name: S15.5.4.8_A1_T1; +* @section: 15.5.4.8; +* @assertion: String.prototype.lastIndexOf(searchString, position); +* @description: Arguments are false and true, and instance is object; +*/ + +var __instance = new Object(true); + +var __instance.lastIndexOf = String.prototype.lastIndexOf; + +////////////////////////////////////////////////////////////////////////////// +//CHECK#1 +if (__instance.lastIndexOf(true, false) !== 0) { + $ERROR('#1: __instance = new Object(true); __instance.lastIndexOf = String.prototype.lastIndexOf; __instance.lastIndexOf(true, false) === 0. Actual: '+__instance.lastIndexOf(true, false) ); +} +// +////////////////////////////////////////////////////////////////////////////// -- GitLab