diff --git a/test/suite/converted/13_Function_Definition/13.2_Creating_Function_Objects/S13.2.1_A7_T3.js b/test/suite/converted/13_Function_Definition/13.2_Creating_Function_Objects/S13.2.1_A7_T3.js index c3b2fb0d740cdf84802cf3f19a4f7a75f2b64e90..f361c45b24ba3fa28405e34c9d2fa76cb9e9eb61 100644 --- a/test/suite/converted/13_Function_Definition/13.2_Creating_Function_Objects/S13.2.1_A7_T3.js +++ b/test/suite/converted/13_Function_Definition/13.2_Creating_Function_Objects/S13.2.1_A7_T3.js @@ -11,8 +11,9 @@ * @description Returning number. Declaring a function with "function __func()" */ +var x; function __func(){ - var x = 1; + x = 1; return x; } @@ -28,7 +29,7 @@ try { ////////////////////////////////////////////////////////////////////////////// //CHECK#1 try{ - var __x=__func() + var __x=__func(); } catch(e){ $ERROR('#1: var __x=__func() does not lead to throwing exception. Actual: exception is '+e); } diff --git a/test/suite/converted/chapter07/7.3/7.3-1.js b/test/suite/converted/chapter07/7.3/7.3-1.js index 6ccaf9def45d470627cad4dc372780b7869cd467..7435b6c6565edda12adcf9091a7f12924d83abb5 100644 --- a/test/suite/converted/chapter07/7.3/7.3-1.js +++ b/test/suite/converted/chapter07/7.3/7.3-1.js @@ -25,7 +25,7 @@ function testcase() { - eval("var test\u2028prop = 66;"); - return prop === 66 && !this.hasOwnProperty("test") && typeof test === "undefined"; + eval("var test7_3_1\u2028prop = 66;"); + return (prop === 66) && ((typeof test7_3_1) === "undefined"); } runTestCase(testcase); diff --git a/test/suite/converted/chapter07/7.3/7.3-2.js b/test/suite/converted/chapter07/7.3/7.3-2.js index a6228674ba7b0278ac760a5ae398a6f0b7ca2b6a..5ee19bd48f14c13485198874e14710dcbd6d9b43 100644 --- a/test/suite/converted/chapter07/7.3/7.3-2.js +++ b/test/suite/converted/chapter07/7.3/7.3-2.js @@ -25,7 +25,7 @@ function testcase() { - eval("var test\u2029prop = 66;"); - return prop === 66 && !this.hasOwnProperty("test") && typeof test === "undefined"; + eval("var test7_3_2\u2029prop = 66;"); + return (prop===66) && ((typeof test7_3_2) === "undefined"); } runTestCase(testcase); diff --git a/test/suite/converted/chapter07/7.6/7.6.1/7.6.1.2-1gs.js b/test/suite/converted/chapter07/7.6/7.6.1/7.6.1.2-1gs.js new file mode 100644 index 0000000000000000000000000000000000000000..c78e4827870e93d436c54f1b162dccb24269d538 --- /dev/null +++ b/test/suite/converted/chapter07/7.6/7.6.1/7.6.1.2-1gs.js @@ -0,0 +1,10 @@ + + +/** + * @path chapter07/7.6/7.6.1/7.6.1.2-1gs.js + * @strict_only + */ + + +throw NotEarlyError; +var implements = 1; diff --git a/test/suite/converted/chapter07/7.8/7.8.3/7.8.3-1gs.js b/test/suite/converted/chapter07/7.8/7.8.3/7.8.3-1gs.js new file mode 100644 index 0000000000000000000000000000000000000000..8f1b5242e1db30d5b7a2e07da085b1d7b1632ca0 --- /dev/null +++ b/test/suite/converted/chapter07/7.8/7.8.3/7.8.3-1gs.js @@ -0,0 +1,10 @@ + + +/** + * @path chapter07/7.8/7.8.3/7.8.3-1gs.js + * @strict_only + */ + + +throw NotEarlyError; +var y = 010; diff --git a/test/suite/converted/chapter07/7.8/7.8.5/7.8.5-1gs.js b/test/suite/converted/chapter07/7.8/7.8.5/7.8.5-1gs.js new file mode 100644 index 0000000000000000000000000000000000000000..28918dca34378a1ffbcf04a0d7e26ccd9a3b698d --- /dev/null +++ b/test/suite/converted/chapter07/7.8/7.8.5/7.8.5-1gs.js @@ -0,0 +1,9 @@ + + +/** + * @path chapter07/7.8/7.8.5/7.8.5-1gs.js + */ + +throw NotEarlyError; +var re = //; + diff --git a/test/suite/converted/chapter07/7.8/7.8.5/7.8.5-2gs.js b/test/suite/converted/chapter07/7.8/7.8.5/7.8.5-2gs.js new file mode 100644 index 0000000000000000000000000000000000000000..669fb47c97516f1bfbc857c484d78c4294653ef5 --- /dev/null +++ b/test/suite/converted/chapter07/7.8/7.8.5/7.8.5-2gs.js @@ -0,0 +1,8 @@ + + +/** + * @path chapter07/7.8/7.8.5/7.8.5-2gs.js + */ + +var re = new RegExp(""); + diff --git a/test/suite/converted/chapter08/8.7/8.7.2/8.7.2-3-a-1gs.js b/test/suite/converted/chapter08/8.7/8.7.2/8.7.2-3-a-1gs.js new file mode 100644 index 0000000000000000000000000000000000000000..26d4f0d7a6e8558749525a10bfe082e6a3a8aabf --- /dev/null +++ b/test/suite/converted/chapter08/8.7/8.7.2/8.7.2-3-a-1gs.js @@ -0,0 +1,9 @@ + + +/** + * @path chapter08/8.7/8.7.2/8.7.2-3-a-1gs.js + * @strict_only + */ + + +b = 11; diff --git a/test/suite/converted/chapter08/8.7/8.7.2/8.7.2-3-a-2gs.js b/test/suite/converted/chapter08/8.7/8.7.2/8.7.2-3-a-2gs.js new file mode 100644 index 0000000000000000000000000000000000000000..ca62f2cfce4adcb82ba11382f590e30413ca509f --- /dev/null +++ b/test/suite/converted/chapter08/8.7/8.7.2/8.7.2-3-a-2gs.js @@ -0,0 +1,10 @@ + + +/** + * @path chapter08/8.7/8.7.2/8.7.2-3-a-2gs.js + * @strict_only + */ + + +throw NotEarlyError; +b = 11; diff --git a/test/suite/converted/chapter10/10.1/10.1.1/10.1.1-2gs.js b/test/suite/converted/chapter10/10.1/10.1.1/10.1.1-2gs.js new file mode 100644 index 0000000000000000000000000000000000000000..48e419865ed5822f725a0a8410f097a017390b23 --- /dev/null +++ b/test/suite/converted/chapter10/10.1/10.1.1/10.1.1-2gs.js @@ -0,0 +1,9 @@ + + +/** + * @path chapter10/10.1/10.1.1/10.1.1-2gs.js + */ + +"use strict" +throw NotEarlyError; +var public = 1; diff --git a/test/suite/converted/chapter10/10.1/10.1.1/10.1.1-5gs.js b/test/suite/converted/chapter10/10.1/10.1.1/10.1.1-5gs.js new file mode 100644 index 0000000000000000000000000000000000000000..edd27d22eedaa732c73d30f8fa0e23997df0d77d --- /dev/null +++ b/test/suite/converted/chapter10/10.1/10.1.1/10.1.1-5gs.js @@ -0,0 +1,10 @@ + + +/** + * @path chapter10/10.1/10.1.1/10.1.1-5gs.js + * @strict_only + */ + + +throw NotEarlyError; +var public = 1; diff --git a/test/suite/converted/chapter10/10.1/10.1.1/10.1.1-8gs.js b/test/suite/converted/chapter10/10.1/10.1.1/10.1.1-8gs.js new file mode 100644 index 0000000000000000000000000000000000000000..9952ae0b4906b099bd8b5ac177a0dc2e1a9d00a4 --- /dev/null +++ b/test/suite/converted/chapter10/10.1/10.1.1/10.1.1-8gs.js @@ -0,0 +1,11 @@ + + +/** + * @path chapter10/10.1/10.1.1/10.1.1-8gs.js + * @strict_only + */ + + +"use strict"; +throw NotEarlyError; +var public = 1; diff --git a/test/suite/converted/chapter10/10.4/10.4.2/10.4.2.1-1gs.js b/test/suite/converted/chapter10/10.4/10.4.2/10.4.2.1-1gs.js new file mode 100644 index 0000000000000000000000000000000000000000..4fe5ff6b3ea084d9c180be7016a87ccc766e8919 --- /dev/null +++ b/test/suite/converted/chapter10/10.4/10.4.2/10.4.2.1-1gs.js @@ -0,0 +1,11 @@ + + +/** + * @path chapter10/10.4/10.4.2/10.4.2.1-1gs.js + * @strict_only + */ + + +eval("var x = 7;"); +x = 9; +throw NotEarlyError; diff --git a/test/suite/converted/chapter10/10.4/10.4.3/10.4.3-1-7-s.js b/test/suite/converted/chapter10/10.4/10.4.3/10.4.3-1-7-s.js new file mode 100644 index 0000000000000000000000000000000000000000..832b6bec11eabed0d82147016eaabb1157d07ce6 --- /dev/null +++ b/test/suite/converted/chapter10/10.4/10.4.3/10.4.3-1-7-s.js @@ -0,0 +1,35 @@ +/// Copyright (c) 2011 Microsoft Corporation +/// +/// Redistribution and use in source and binary forms, with or without modification, are permitted provided +/// that the following conditions are met: +/// * Redistributions of source code must retain the above copyright notice, this list of conditions and +/// the following disclaimer. +/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and +/// the following disclaimer in the documentation and/or other materials provided with the distribution. +/// * Neither the name of Microsoft nor the names of its contributors may be used to +/// endorse or promote products derived from this software without specific prior written permission. +/// +/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR +/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE +/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF +/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +/** + * @path chapter10/10.4/10.4.3/10.4.3-1-7-s.js + * @description Strict Mode - checking 'this' (FunctionDeclaration defined within strict mode) + * @strict_only + */ + + +function testcase() { +"use strict"; +function f() { + return typeof this; +} +return f() === "undefined"; +} +runTestCase(testcase); diff --git a/test/suite/converted/chapter10/10.4/10.4.3/10.4.3-1-7gs.js b/test/suite/converted/chapter10/10.4/10.4.3/10.4.3-1-7gs.js new file mode 100644 index 0000000000000000000000000000000000000000..6cbfbe51d454566af41565841f4e8126029fb35a --- /dev/null +++ b/test/suite/converted/chapter10/10.4/10.4.3/10.4.3-1-7gs.js @@ -0,0 +1,32 @@ +/// Copyright (c) 2011 Microsoft Corporation +/// +/// Redistribution and use in source and binary forms, with or without modification, are permitted provided +/// that the following conditions are met: +/// * Redistributions of source code must retain the above copyright notice, this list of conditions and +/// the following disclaimer. +/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and +/// the following disclaimer in the documentation and/or other materials provided with the distribution. +/// * Neither the name of Microsoft nor the names of its contributors may be used to +/// endorse or promote products derived from this software without specific prior written permission. +/// +/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR +/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE +/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF +/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +/** + * @path chapter10/10.4/10.4.3/10.4.3-1-7gs.js + * @strict_only + */ + + +function f() { + return typeof this; +} +if (f() !== "undefined") { + throw "'this' had incorrect value!"; +} diff --git a/test/suite/converted/chapter10/10.4/10.4.3/10.4.3-1-8-s.js b/test/suite/converted/chapter10/10.4/10.4.3/10.4.3-1-8-s.js new file mode 100644 index 0000000000000000000000000000000000000000..d3595a40e8b79b4cad7183a7f30e1888edad1c3b --- /dev/null +++ b/test/suite/converted/chapter10/10.4/10.4.3/10.4.3-1-8-s.js @@ -0,0 +1,35 @@ +/// Copyright (c) 2011 Microsoft Corporation +/// +/// Redistribution and use in source and binary forms, with or without modification, are permitted provided +/// that the following conditions are met: +/// * Redistributions of source code must retain the above copyright notice, this list of conditions and +/// the following disclaimer. +/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and +/// the following disclaimer in the documentation and/or other materials provided with the distribution. +/// * Neither the name of Microsoft nor the names of its contributors may be used to +/// endorse or promote products derived from this software without specific prior written permission. +/// +/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR +/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE +/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF +/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +/** + * @path chapter10/10.4/10.4.3/10.4.3-1-8-s.js + * @description Strict Mode - checking 'this' (FunctionDeclaration includes strict directive prologue) + * @strict_only + */ + + +function testcase() { +function f() { + "use strict"; + return typeof this; +} +return f() === "undefined"; +} +runTestCase(testcase); diff --git a/test/suite/converted/chapter10/10.4/10.4.3/10.4.3-1-8gs.js b/test/suite/converted/chapter10/10.4/10.4.3/10.4.3-1-8gs.js new file mode 100644 index 0000000000000000000000000000000000000000..041ef17a5b4050591eed6e17efa42031c2c97868 --- /dev/null +++ b/test/suite/converted/chapter10/10.4/10.4.3/10.4.3-1-8gs.js @@ -0,0 +1,31 @@ +/// Copyright (c) 2011 Microsoft Corporation +/// +/// Redistribution and use in source and binary forms, with or without modification, are permitted provided +/// that the following conditions are met: +/// * Redistributions of source code must retain the above copyright notice, this list of conditions and +/// the following disclaimer. +/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and +/// the following disclaimer in the documentation and/or other materials provided with the distribution. +/// * Neither the name of Microsoft nor the names of its contributors may be used to +/// endorse or promote products derived from this software without specific prior written permission. +/// +/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR +/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE +/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF +/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +/** + * @path chapter10/10.4/10.4.3/10.4.3-1-8gs.js + */ + +function f() { + "use strict"; + return typeof this; +} +if (f() !== "undefined") { + throw "'this' had incorrect value!"; +} diff --git a/test/suite/converted/chapter10/10.5/10.5-1gs.js b/test/suite/converted/chapter10/10.5/10.5-1gs.js new file mode 100644 index 0000000000000000000000000000000000000000..33ee9dbc2ef68b247fbc7658ad52530bcd6fe1a5 --- /dev/null +++ b/test/suite/converted/chapter10/10.5/10.5-1gs.js @@ -0,0 +1,14 @@ + + +/** + * @path chapter10/10.5/10.5-1gs.js + * @strict_only + */ + + +throw NotEarlyError; + +function f_10_5_1_gs(){ + arguments = 7; +} + diff --git a/test/suite/converted/chapter10/10.5/10.5-7-b-2-s.js b/test/suite/converted/chapter10/10.5/10.5-7-b-2-s.js index 2cb4cd254ff7460a81a4274a5d19138aafd02724..82dc1869ed32edb44b82489ee237f5611709baf3 100644 --- a/test/suite/converted/chapter10/10.5/10.5-7-b-2-s.js +++ b/test/suite/converted/chapter10/10.5/10.5-7-b-2-s.js @@ -20,7 +20,7 @@ /** * @path chapter10/10.5/10.5-7-b-2-s.js - * @description Strict Mode - arguments object index assignment is disallowed + * @description Strict Mode - arguments object index assignment is allowed * @strict_only */ diff --git a/test/suite/converted/chapter10/10.6/10.6-1gs.js b/test/suite/converted/chapter10/10.6/10.6-1gs.js new file mode 100644 index 0000000000000000000000000000000000000000..dcb1e9372d51639b803c4465667512a5625a99f5 --- /dev/null +++ b/test/suite/converted/chapter10/10.6/10.6-1gs.js @@ -0,0 +1,12 @@ + + +/** + * @path chapter10/10.6/10.6-1gs.js + * @strict_only + */ + + +function f_10_6_1_gs(){ + return arguments.callee; +} + diff --git a/test/suite/converted/chapter10/10.6/10.6-2gs.js b/test/suite/converted/chapter10/10.6/10.6-2gs.js new file mode 100644 index 0000000000000000000000000000000000000000..dd102b6200c8af60935fceb65a7e9c2d85f8ad3a --- /dev/null +++ b/test/suite/converted/chapter10/10.6/10.6-2gs.js @@ -0,0 +1,13 @@ + + +/** + * @path chapter10/10.6/10.6-2gs.js + * @strict_only + */ + + +function f_10_6_1_gs(){ + return arguments.callee; +} +f_10_6_1_gs(); + diff --git a/test/suite/converted/chapter11/11.1/11.1.1/11.1.1-1gs.js b/test/suite/converted/chapter11/11.1/11.1.1/11.1.1-1gs.js new file mode 100644 index 0000000000000000000000000000000000000000..cfee8a7acee0341c2ff84195ae73aaf9ab486f63 --- /dev/null +++ b/test/suite/converted/chapter11/11.1/11.1.1/11.1.1-1gs.js @@ -0,0 +1,11 @@ + + +/** + * @path chapter11/11.1/11.1.1/11.1.1-1gs.js + * @strict_only + */ + + +if (this===undefined) { + throw NotEarlyError; +} diff --git a/test/suite/converted/chapter11/11.13/11.13.2/11.13.2-6-1gs.js b/test/suite/converted/chapter11/11.13/11.13.2/11.13.2-6-1gs.js new file mode 100644 index 0000000000000000000000000000000000000000..eca7e6b504f403f939b91a5548ffd87605fd8e29 --- /dev/null +++ b/test/suite/converted/chapter11/11.13/11.13.2/11.13.2-6-1gs.js @@ -0,0 +1,10 @@ + + +/** + * @path chapter11/11.13/11.13.2/11.13.2-6-1gs.js + * @strict_only + */ + + +throw NotEarlyError; +eval *= 20; diff --git a/test/suite/converted/chapter11/11.3/11.3.1/11.3.1-2-1gs.js b/test/suite/converted/chapter11/11.3/11.3.1/11.3.1-2-1gs.js new file mode 100644 index 0000000000000000000000000000000000000000..82d69af6db409c17df982ffc98795b1796f90a2e --- /dev/null +++ b/test/suite/converted/chapter11/11.3/11.3.1/11.3.1-2-1gs.js @@ -0,0 +1,10 @@ + + +/** + * @path chapter11/11.3/11.3.1/11.3.1-2-1gs.js + * @strict_only + */ + + +throw NotEarlyError; +arguments++; diff --git a/test/suite/converted/chapter11/11.3/11.3.1/11.3.1-2-3-s.js b/test/suite/converted/chapter11/11.3/11.3.1/11.3.1-2-3-s.js new file mode 100644 index 0000000000000000000000000000000000000000..ee21b1996e2e8ceba7b01c80496c9f4dcc0ae558 --- /dev/null +++ b/test/suite/converted/chapter11/11.3/11.3.1/11.3.1-2-3-s.js @@ -0,0 +1,34 @@ +/// Copyright (c) 2009 Microsoft Corporation +/// +/// Redistribution and use in source and binary forms, with or without modification, are permitted provided +/// that the following conditions are met: +/// * Redistributions of source code must retain the above copyright notice, this list of conditions and +/// the following disclaimer. +/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and +/// the following disclaimer in the documentation and/or other materials provided with the distribution. +/// * Neither the name of Microsoft nor the names of its contributors may be used to +/// endorse or promote products derived from this software without specific prior written permission. +/// +/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR +/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE +/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF +/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +/** + * @path chapter11/11.3/11.3.1/11.3.1-2-3-s.js + * @description Strict Mode - SyntaxError is not thrown if the identifier 'arguments[...]' appears as a PostfixExpression(arguments++) + * @strict_only + */ + + +function testcase() { + "use strict"; + arguments[1] = 7; + arguments[1]++; + return arguments[1]===8; + } +runTestCase(testcase); diff --git a/test/suite/converted/chapter11/11.3/11.3.2/11.3.2-2-3-s.js b/test/suite/converted/chapter11/11.3/11.3.2/11.3.2-2-3-s.js new file mode 100644 index 0000000000000000000000000000000000000000..8cfc84294c7482c7b2b2b8e34597d906c4bf8717 --- /dev/null +++ b/test/suite/converted/chapter11/11.3/11.3.2/11.3.2-2-3-s.js @@ -0,0 +1,34 @@ +/// Copyright (c) 2009 Microsoft Corporation +/// +/// Redistribution and use in source and binary forms, with or without modification, are permitted provided +/// that the following conditions are met: +/// * Redistributions of source code must retain the above copyright notice, this list of conditions and +/// the following disclaimer. +/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and +/// the following disclaimer in the documentation and/or other materials provided with the distribution. +/// * Neither the name of Microsoft nor the names of its contributors may be used to +/// endorse or promote products derived from this software without specific prior written permission. +/// +/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR +/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE +/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF +/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +/** + * @path chapter11/11.3/11.3.2/11.3.2-2-3-s.js + * @description Strict Mode - SyntaxError is not thrown if the identifier 'arguments[...]' appears as a PostfixExpression(arguments--) + * @strict_only + */ + + +function testcase() { + "use strict"; + arguments[1] = 7; + arguments[1]--; + return arguments[1]===6; + } +runTestCase(testcase); diff --git a/test/suite/converted/chapter11/11.4/11.4.4/11.4.4-2-3-s.js b/test/suite/converted/chapter11/11.4/11.4.4/11.4.4-2-3-s.js new file mode 100644 index 0000000000000000000000000000000000000000..98b0e73b2e5d0cc9418e298e7153f40c754a38d0 --- /dev/null +++ b/test/suite/converted/chapter11/11.4/11.4.4/11.4.4-2-3-s.js @@ -0,0 +1,34 @@ +/// Copyright (c) 2009 Microsoft Corporation +/// +/// Redistribution and use in source and binary forms, with or without modification, are permitted provided +/// that the following conditions are met: +/// * Redistributions of source code must retain the above copyright notice, this list of conditions and +/// the following disclaimer. +/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and +/// the following disclaimer in the documentation and/or other materials provided with the distribution. +/// * Neither the name of Microsoft nor the names of its contributors may be used to +/// endorse or promote products derived from this software without specific prior written permission. +/// +/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR +/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE +/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF +/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +/** + * @path chapter11/11.4/11.4.4/11.4.4-2-3-s.js + * @description Strict Mode - SyntaxError is not thrown for ++arguments[...] + * @strict_only + */ + + +function testcase() { + "use strict"; + arguments[1] = 7; + ++arguments[1]; + return arguments[1]===8; + } +runTestCase(testcase); diff --git a/test/suite/converted/chapter11/11.4/11.4.5/11.4.5-2-2gs.js b/test/suite/converted/chapter11/11.4/11.4.5/11.4.5-2-2gs.js new file mode 100644 index 0000000000000000000000000000000000000000..c51ed89e8e4fc8fb51d96aed759ebe14f744ddae --- /dev/null +++ b/test/suite/converted/chapter11/11.4/11.4.5/11.4.5-2-2gs.js @@ -0,0 +1,10 @@ + + +/** + * @path chapter11/11.4/11.4.5/11.4.5-2-2gs.js + * @strict_only + */ + + +throw NotEarlyError; +--arguments; diff --git a/test/suite/converted/chapter11/11.4/11.4.5/11.4.5-2-3-s.js b/test/suite/converted/chapter11/11.4/11.4.5/11.4.5-2-3-s.js new file mode 100644 index 0000000000000000000000000000000000000000..1517c64582a646156ddc2f8b5cb0f40c7613385d --- /dev/null +++ b/test/suite/converted/chapter11/11.4/11.4.5/11.4.5-2-3-s.js @@ -0,0 +1,34 @@ +/// Copyright (c) 2009 Microsoft Corporation +/// +/// Redistribution and use in source and binary forms, with or without modification, are permitted provided +/// that the following conditions are met: +/// * Redistributions of source code must retain the above copyright notice, this list of conditions and +/// the following disclaimer. +/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and +/// the following disclaimer in the documentation and/or other materials provided with the distribution. +/// * Neither the name of Microsoft nor the names of its contributors may be used to +/// endorse or promote products derived from this software without specific prior written permission. +/// +/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR +/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE +/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF +/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +/** + * @path chapter11/11.4/11.4.5/11.4.5-2-3-s.js + * @description Strict Mode - SyntaxError is not thrown for --arguments[...] + * @strict_only + */ + + +function testcase() { + "use strict"; + arguments[1] = 7; + --arguments[1]; + return arguments[1]===6; + } +runTestCase(testcase); diff --git a/test/suite/converted/chapter11/11.4/11.4.6/11.4.6-2-1.js b/test/suite/converted/chapter11/11.4/11.4.6/11.4.6-2-1.js new file mode 100644 index 0000000000000000000000000000000000000000..b4e1d38163f670e797849ae5d351f5eac721f973 --- /dev/null +++ b/test/suite/converted/chapter11/11.4/11.4.6/11.4.6-2-1.js @@ -0,0 +1,27 @@ +/// Copyright (c) 2009 Microsoft Corporation +/// +/// Redistribution and use in source and binary forms, with or without modification, are permitted provided +/// that the following conditions are met: +/// * Redistributions of source code must retain the above copyright notice, this list of conditions and +/// the following disclaimer. +/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and +/// the following disclaimer in the documentation and/or other materials provided with the distribution. +/// * Neither the name of Microsoft nor the names of its contributors may be used to +/// endorse or promote products derived from this software without specific prior written permission. +/// +/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR +/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE +/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF +/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +/** + * @path chapter11/11.4/11.4.6/11.4.6-2-1.js + * @description +"" should be zero + */ + + +assertTruthy(+"" === 0); diff --git a/test/suite/converted/chapter11/11.4/11.4.7/11.4.7-4-1.js b/test/suite/converted/chapter11/11.4/11.4.7/11.4.7-4-1.js new file mode 100644 index 0000000000000000000000000000000000000000..4d2ad803145623e795654d90812cf86e025c12ab --- /dev/null +++ b/test/suite/converted/chapter11/11.4/11.4.7/11.4.7-4-1.js @@ -0,0 +1,27 @@ +/// Copyright (c) 2009 Microsoft Corporation +/// +/// Redistribution and use in source and binary forms, with or without modification, are permitted provided +/// that the following conditions are met: +/// * Redistributions of source code must retain the above copyright notice, this list of conditions and +/// the following disclaimer. +/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and +/// the following disclaimer in the documentation and/or other materials provided with the distribution. +/// * Neither the name of Microsoft nor the names of its contributors may be used to +/// endorse or promote products derived from this software without specific prior written permission. +/// +/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR +/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE +/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF +/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +/** + * @path chapter11/11.4/11.4.7/11.4.7-4-1.js + * @description -"" should be zero + */ + + +assertTruthy(-"" === 0); diff --git a/test/suite/converted/chapter12/12.10/12.10.1/12.10.1-11gs.js b/test/suite/converted/chapter12/12.10/12.10.1/12.10.1-11gs.js new file mode 100644 index 0000000000000000000000000000000000000000..ca9fc3ae07e98d72ea73e7649279832e8a94dec0 --- /dev/null +++ b/test/suite/converted/chapter12/12.10/12.10.1/12.10.1-11gs.js @@ -0,0 +1,10 @@ + + +/** + * @path chapter12/12.10/12.10.1/12.10.1-11gs.js + * @strict_only + */ + + +throw NotEarlyError; +with ({}) { } diff --git a/test/suite/converted/chapter12/12.14/12.14-5.js b/test/suite/converted/chapter12/12.14/12.14-5.js new file mode 100644 index 0000000000000000000000000000000000000000..a8be0fa189b151aeb54ac4469ac9da5603597f01 --- /dev/null +++ b/test/suite/converted/chapter12/12.14/12.14-5.js @@ -0,0 +1,48 @@ +/// Copyright (c) 2009 Microsoft Corporation +/// +/// Redistribution and use in source and binary forms, with or without modification, are permitted provided +/// that the following conditions are met: +/// * Redistributions of source code must retain the above copyright notice, this list of conditions and +/// the following disclaimer. +/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and +/// the following disclaimer in the documentation and/or other materials provided with the distribution. +/// * Neither the name of Microsoft nor the names of its contributors may be used to +/// endorse or promote products derived from this software without specific prior written permission. +/// +/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR +/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE +/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF +/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +/** + * local vars must not be visible outside with block + * local functions must not be visible outside with block + * local function expresssions should not be visible outside with block + * local vars must shadow outer vars + * local functions must shadow outer functions + * local function expresssions must shadow outer function expressions + * eval should use the appended object to the scope chain + * + * @path chapter12/12.14/12.14-5.js + * @description catch introduces scope - block-local functions must shadow outer functions + */ + + +function testcase() { + var o = {foo: function () { return 42;}}; + + try { + throw o; + } + catch (e) { + function foo() {} + if (foo() === undefined) { + return true; + } + } + } +runTestCase(testcase); diff --git a/test/suite/converted/chapter12/12.14/12.14.1/12.14.1-1gs.js b/test/suite/converted/chapter12/12.14/12.14.1/12.14.1-1gs.js new file mode 100644 index 0000000000000000000000000000000000000000..911f5d74cad4285e43ad1a6841ce84ed7a82c094 --- /dev/null +++ b/test/suite/converted/chapter12/12.14/12.14.1/12.14.1-1gs.js @@ -0,0 +1,10 @@ + + +/** + * @path chapter12/12.14/12.14.1/12.14.1-1gs.js + * @strict_only + */ + + +throw NotEarlyError; +try { } catch (eval) { } diff --git a/test/suite/converted/chapter13/13.0/13_4-17gs.js b/test/suite/converted/chapter13/13.0/13_4-17gs.js new file mode 100644 index 0000000000000000000000000000000000000000..9323c32426b9178bc95d723d8c3b84247601cb90 --- /dev/null +++ b/test/suite/converted/chapter13/13.0/13_4-17gs.js @@ -0,0 +1,10 @@ + + +/** + * @path chapter13/13.0/13_4-17gs.js + * @strict_only + */ + + +var _13_4_17_fun = new Function('eval = 42;'); +throw NotEarlyError; diff --git a/test/suite/converted/chapter13/13.0/13_4-5gs.js b/test/suite/converted/chapter13/13.0/13_4-5gs.js new file mode 100644 index 0000000000000000000000000000000000000000..e180cca28175ba4986bf661a74b99305aff14521 --- /dev/null +++ b/test/suite/converted/chapter13/13.0/13_4-5gs.js @@ -0,0 +1,10 @@ + + +/** + * @path chapter13/13.0/13_4-5gs.js + * @strict_only + */ + + +throw NotEarlyError; +function _13_0_4_5_fun() { eval = 42; }; diff --git a/test/suite/converted/chapter15/15.1/15.1.1/15.1.1.1/15.1.1.1-0.js b/test/suite/converted/chapter15/15.1/15.1.1/15.1.1.1/15.1.1.1-0.js index 5132a9bbc33860e82d7529f87f04f71546f7f9d7..4e89a651e227cae42f90f130dc5f09c909e395e0 100644 --- a/test/suite/converted/chapter15/15.1/15.1.1/15.1.1.1/15.1.1.1-0.js +++ b/test/suite/converted/chapter15/15.1/15.1.1/15.1.1.1/15.1.1.1-0.js @@ -23,9 +23,9 @@ * @description Global.NaN is a data property with default attribute values (false) */ -var global = this; + function testcase() { - var desc = Object.getOwnPropertyDescriptor(global, 'NaN'); + var desc = Object.getOwnPropertyDescriptor(fnGlobalObject(), 'NaN'); if (desc.writable === false && desc.enumerable === false && desc.configurable === false) { diff --git a/test/suite/converted/chapter15/15.1/15.1.1/15.1.1.2/15.1.1.2-0.js b/test/suite/converted/chapter15/15.1/15.1.1/15.1.1.2/15.1.1.2-0.js index 3cd5c7418064dd5ef17746b79914c3a009995bf1..62b9241832ee8f3ccd23e6c81e23c2863bb9c8e1 100644 --- a/test/suite/converted/chapter15/15.1/15.1.1/15.1.1.2/15.1.1.2-0.js +++ b/test/suite/converted/chapter15/15.1/15.1.1/15.1.1.2/15.1.1.2-0.js @@ -23,9 +23,9 @@ * @description Global.Infinity is a data property with default attribute values (false) */ -var global = this; + function testcase() { - var desc = Object.getOwnPropertyDescriptor(global, 'Infinity'); + var desc = Object.getOwnPropertyDescriptor(fnGlobalObject(), 'Infinity'); if (desc.writable === false && desc.enumerable === false && desc.configurable === false) { diff --git a/test/suite/converted/chapter15/15.1/15.1.1/15.1.1.3/15.1.1.3-0.js b/test/suite/converted/chapter15/15.1/15.1.1/15.1.1.3/15.1.1.3-0.js index 453f5650a7030d27016f068c77f6cea47ceee265..6d0d44c9679937b32580100e9320dbee843ac0dc 100644 --- a/test/suite/converted/chapter15/15.1/15.1.1/15.1.1.3/15.1.1.3-0.js +++ b/test/suite/converted/chapter15/15.1/15.1.1/15.1.1.3/15.1.1.3-0.js @@ -23,9 +23,9 @@ * @description Global.undefined is a data property with default attribute values (false) */ -var global = this; + function testcase() { - var desc = Object.getOwnPropertyDescriptor(global, 'undefined'); + var desc = Object.getOwnPropertyDescriptor(fnGlobalObject(), 'undefined'); if (desc.writable === false && desc.enumerable === false && desc.configurable === false) { diff --git a/test/suite/converted/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-625gs.js b/test/suite/converted/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-625gs.js new file mode 100644 index 0000000000000000000000000000000000000000..db65d5d8b82fffbfa822d99fa59d62c902e1200f --- /dev/null +++ b/test/suite/converted/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-625gs.js @@ -0,0 +1,33 @@ +/// Copyright (c) 2009 Microsoft Corporation +/// +/// Redistribution and use in source and binary forms, with or without modification, are permitted provided +/// that the following conditions are met: +/// * Redistributions of source code must retain the above copyright notice, this list of conditions and +/// the following disclaimer. +/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and +/// the following disclaimer in the documentation and/or other materials provided with the distribution. +/// * Neither the name of Microsoft nor the names of its contributors may be used to +/// endorse or promote products derived from this software without specific prior written permission. +/// +/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR +/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE +/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF +/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +/** + * @path chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-625gs.js + */ + +Object.defineProperty(Object.prototype, + "prop", + { value: 1001, writable: false, enumerable: false, configurable: false} + ); +var prop = 1002; + +if (! (this.hasOwnProperty("prop") && prop === 1002)) { + throw "this.prop should take precedence over Object.prototype.prop"; +} diff --git a/test/suite/converted/chapter15/15.3/15.3.2/15.3.2.1/15.3.2.1-10-4gs.js b/test/suite/converted/chapter15/15.3/15.3.2/15.3.2.1/15.3.2.1-10-4gs.js new file mode 100644 index 0000000000000000000000000000000000000000..de69fc2e1d96d09050a611ab1e14a69b0b76c6cf --- /dev/null +++ b/test/suite/converted/chapter15/15.3/15.3.2/15.3.2.1/15.3.2.1-10-4gs.js @@ -0,0 +1,10 @@ + + +/** + * @path chapter15/15.3/15.3.2/15.3.2.1/15.3.2.1-10-4gs.js + * @strict_only + */ + + +throw NotEarlyError; +var _15_3_2_1_10_4_fun = new Function('param_1', 'param_2', 'param_1', '"use strict"; return 0;'); diff --git a/test/suite/converted/chapter15/15.3/15.3.2/15.3.2.1/15.3.2.1-10-6gs.js b/test/suite/converted/chapter15/15.3/15.3.2/15.3.2.1/15.3.2.1-10-6gs.js new file mode 100644 index 0000000000000000000000000000000000000000..f31beeafc66586a999c8d042426d13581608c773 --- /dev/null +++ b/test/suite/converted/chapter15/15.3/15.3.2/15.3.2.1/15.3.2.1-10-6gs.js @@ -0,0 +1,8 @@ + + +/** + * @path chapter15/15.3/15.3.2/15.3.2.1/15.3.2.1-10-6gs.js + */ + +throw NotEarlyError; +var _15_3_2_1_10_6_fun = new Function('param_1', 'param_2', 'param_1', '"use strict";return 0;'); diff --git a/test/suite/converted/chapter15/15.3/15.3.5/15.3.5-1gs.js b/test/suite/converted/chapter15/15.3/15.3.5/15.3.5-1gs.js new file mode 100644 index 0000000000000000000000000000000000000000..38a6397b1ac1ce307b525a3f0a9586a7e7d71fa0 --- /dev/null +++ b/test/suite/converted/chapter15/15.3/15.3.5/15.3.5-1gs.js @@ -0,0 +1,12 @@ + + +/** + * @path chapter15/15.3/15.3.5/15.3.5-1gs.js + * @strict_only + */ + + +function _15_3_5_1_gs() {} +throw NotEarlyError; +_15_3_5_1_gs.caller; + diff --git a/test/suite/converted/chapter15/15.3/15.3.5/15.3.5-2gs.js b/test/suite/converted/chapter15/15.3/15.3.5/15.3.5-2gs.js new file mode 100644 index 0000000000000000000000000000000000000000..919dd965e411d62a6d48c1f5aef60da65c742a8e --- /dev/null +++ b/test/suite/converted/chapter15/15.3/15.3.5/15.3.5-2gs.js @@ -0,0 +1,11 @@ + + +/** + * @path chapter15/15.3/15.3.5/15.3.5-2gs.js + * @strict_only + */ + + +function _15_3_5_1_gs() {} +_15_3_5_1_gs.caller; +throw NotEarlyError;