Updated test262 with test case additions and edits from the PPB2 release of IE10. This included:

- 22 test case additions (mostly strict mode)
- 4 test case edits
This commit is contained in:
David Fugate 2011-06-23 15:04:00 -07:00
parent dc18b7c435
commit 55855b285e
32 changed files with 1039 additions and 36 deletions

View File

@ -0,0 +1,37 @@
/// 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.
ES5Harness.registerTest({
id: "7.3-5",
path: "TestCases/chapter07/7.3/7.3-5.js",
description: "7.3 - ES5 recognizes the character <LS> (\\u2028) as terminating string literal",
test: function testcase() {
var prop = "66\u2028123";
return prop === "66\u2028123" && prop[2] === "\u2028" && prop.length === 6;
},
precondition: function prereq() {
return true;
}
});

View File

@ -0,0 +1,37 @@
/// 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.
ES5Harness.registerTest({
id: "7.3-6",
path: "TestCases/chapter07/7.3/7.3-6.js",
description: "7.3 - ES5 recognizes the character <PS> (\\u2029) as terminating string literal",
test: function testcase() {
var prop = "66\u2029123";
return prop === "66\u2029123" && prop[2] === "\u2029" && prop.length === 6;
},
precondition: function prereq() {
return true;
}
});

View File

@ -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.
ES5Harness.registerTest( {
id: "7.8.4-10-s",
path: "TestCases/chapter07/7.8/7.8.4/7.8.4-10-s.js",
description: "An OctalEscapeSequence is not allowed in a String under Strict Mode",
test: function testcase()
{
try
{
eval('"use strict"; var x = " \\10 ";');
return false;
}
catch (e) {
return (e instanceof SyntaxError);
}
},
strict:1,
precondition: function prereq() {
return fnSupportsStrict();
}
});

View File

@ -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.
ES5Harness.registerTest( {
id: "7.8.4-2-s",
path: "TestCases/chapter07/7.8/7.8.4/7.8.4-2-s.js",
description: "An OctalEscapeSequence is not allowed in a String under Strict Mode",
test: function testcase()
{
try
{
eval('"use strict"; var x = "\\1";');
return false;
}
catch (e) {
return (e instanceof SyntaxError);
}
},
strict:1,
precondition: function prereq() {
return fnSupportsStrict();
}
});

View File

@ -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.
ES5Harness.registerTest( {
id: "7.8.4-3-s",
path: "TestCases/chapter07/7.8/7.8.4/7.8.4-3-s.js",
description: "An OctalEscapeSequence is not allowed in a String under Strict Mode",
test: function testcase()
{
try
{
eval('"use strict"; var x = "a\\4";');
return false;
}
catch (e) {
return (e instanceof SyntaxError);
}
},
strict:1,
precondition: function prereq() {
return fnSupportsStrict();
}
});

View File

@ -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.
ES5Harness.registerTest( {
id: "7.8.4-30-s",
path: "TestCases/chapter07/7.8/7.8.4/7.8.4-30-s.js",
description: "An OctalEscapeSequence is not allowed in a String under Strict Mode",
test: function testcase()
{
try
{
eval('"use strict"; var x = "\\' + '1";');
return false;
}
catch (e) {
return (e instanceof SyntaxError);
}
},
strict:1,
precondition: function prereq() {
return fnSupportsStrict();
}
});

View File

@ -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.
ES5Harness.registerTest( {
id: "7.8.4-31-s",
path: "TestCases/chapter07/7.8/7.8.4/7.8.4-31-s.js",
description: "An OctalEscapeSequence is not allowed in a String under Strict Mode",
test: function testcase()
{
try
{
eval('"use strict"; var x = "\\" + "1";');
return false;
}
catch (e) {
return (e instanceof SyntaxError);
}
},
strict:1,
precondition: function prereq() {
return fnSupportsStrict();
}
});

View File

@ -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.
ES5Harness.registerTest( {
id: "7.8.4-32-s",
path: "TestCases/chapter07/7.8/7.8.4/7.8.4-32-s.js",
description: "Two OctalEscapeSequences in a String are not allowed in a String under Strict Mode",
test: function testcase()
{
try
{
eval('"use strict"; var x = "\\1\\1";');
return false;
}
catch (e) {
return (e instanceof SyntaxError);
}
},
strict:1,
precondition: function prereq() {
return fnSupportsStrict();
}
});

View File

@ -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.
ES5Harness.registerTest( {
id: "7.8.4-33-s",
path: "TestCases/chapter07/7.8/7.8.4/7.8.4-33-s.js",
description: "Three OctalEscapeSequences in a String are not allowed in a String under Strict Mode",
test: function testcase()
{
try
{
eval('"use strict"; var x = "\\1\\2\\7";');
return false;
}
catch (e) {
return (e instanceof SyntaxError);
}
},
strict:1,
precondition: function prereq() {
return fnSupportsStrict();
}
});

View File

@ -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.
ES5Harness.registerTest( {
id: "7.8.4-4-s",
path: "TestCases/chapter07/7.8/7.8.4/7.8.4-4-s.js",
description: "An OctalEscapeSequence is not allowed in a String under Strict Mode",
test: function testcase()
{
try
{
eval('"use strict"; var x = "z\\7";');
return false;
}
catch (e) {
return (e instanceof SyntaxError);
}
},
strict:1,
precondition: function prereq() {
return fnSupportsStrict();
}
});

View File

@ -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.
ES5Harness.registerTest( {
id: "7.8.4-5-s",
path: "TestCases/chapter07/7.8/7.8.4/7.8.4-5-s.js",
description: "An OctalEscapeSequence is not allowed in a String under Strict Mode",
test: function testcase()
{
try
{
eval('"use strict"; var x = "\\00a";');
return false;
}
catch (e) {
return (e instanceof SyntaxError);
}
},
strict:1,
precondition: function prereq() {
return fnSupportsStrict();
}
});

View File

@ -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.
ES5Harness.registerTest( {
id: "7.8.4-6-s",
path: "TestCases/chapter07/7.8/7.8.4/7.8.4-6-s.js",
description: "An OctalEscapeSequence is not allowed in a String under Strict Mode",
test: function testcase()
{
try
{
eval('"use strict"; var x = "\\01z";');
return false;
}
catch (e) {
return (e instanceof SyntaxError);
}
},
strict:1,
precondition: function prereq() {
return fnSupportsStrict();
}
});

View File

@ -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.
ES5Harness.registerTest( {
id: "7.8.4-7-s",
path: "TestCases/chapter07/7.8/7.8.4/7.8.4-7-s.js",
description: "An OctalEscapeSequence is not allowed in a String under Strict Mode",
test: function testcase()
{
try
{
eval('"use strict"; var x = "a\\03z";');
return false;
}
catch (e) {
return (e instanceof SyntaxError);
}
},
strict:1,
precondition: function prereq() {
return fnSupportsStrict();
}
});

View File

@ -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.
ES5Harness.registerTest( {
id: "7.8.4-8-s",
path: "TestCases/chapter07/7.8/7.8.4/7.8.4-8-s.js",
description: "An OctalEscapeSequence is not allowed in a String under Strict Mode",
test: function testcase()
{
try
{
eval('"use strict"; var x = " \\06";');
return false;
}
catch (e) {
return (e instanceof SyntaxError);
}
},
strict:1,
precondition: function prereq() {
return fnSupportsStrict();
}
});

View File

@ -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.
ES5Harness.registerTest( {
id: "7.8.4-9-s",
path: "TestCases/chapter07/7.8/7.8.4/7.8.4-9-s.js",
description: "An OctalEscapeSequence is not allowed in a String under Strict Mode",
test: function testcase()
{
try
{
eval('"use strict"; var x = "\\07 ";');
return false;
}
catch (e) {
return (e instanceof SyntaxError);
}
},
strict:1,
precondition: function prereq() {
return fnSupportsStrict();
}
});

View File

@ -27,14 +27,15 @@ path: "TestCases/chapter12/12.2/12.2.1/12.2.1-12-s.js",
description: "arguments as local var identifier throws SyntaxError in strict mode",
test: function testcase() {
try {
eval("(function (){'use strict'; var arguments;});");
return false;
}
catch (e) {
return (e instanceof SyntaxError);
}
'use strict';
try {
eval('function foo() { var arguments;}');
return false;
}
catch (e) {
return (e instanceof SyntaxError);
}
},
strict:1,
@ -43,4 +44,5 @@ precondition: function prereq() {
return fnSupportsStrict();
}
});

View File

@ -24,33 +24,25 @@ id: "12.2.1-13-s",
path: "TestCases/chapter12/12.2/12.2.1/12.2.1-13-s.js",
description: "arguments as global var identifier throws SyntaxError in strict mode",
description: "arguments assignment throws SyntaxError in strict mode",
test: function testcase() {
'use strict';
var indirectEval = eval;
try {
indirectEval("'use strict'; var arguments;");
return false;
}
catch (e) {
return (e instanceof SyntaxError);
}
try {
eval('function foo() { arguments = 42; }; foo()');
return false;
}
catch (e) {
return (e instanceof SyntaxError);
}
},
strict:1,
precondition: function () {
//indirect eval must be globally scoped
var localVar = "12.2.1-13-s";
var indirectEval = eval;
try {
if (indirectEval("localVar;")==="12.2.1-13-s" )
return false;
} catch (e) {
}
return fnSupportsStrict();
}
precondition: function prereq() {
return fnSupportsStrict();
}
});

View File

@ -0,0 +1,47 @@
/// 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.
ES5Harness.registerTest( {
id: "12.2.1-34-s",
path: "TestCases/chapter12/12.2/12.2.1/12.2.1-34-s.js",
description: "'for(var eval in ...) {...}' throws SyntaxError in strict mode",
test: function testcase() {
'use strict';
try {
eval('for (var eval in null) {};');
return false;
}
catch (e) {
return (e instanceof SyntaxError);
}
},
strict:1,
precondition: function prereq() {
return fnSupportsStrict();
}
});

View File

@ -0,0 +1,47 @@
/// 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.
ES5Harness.registerTest( {
id: "12.2.1-35-s",
path: "TestCases/chapter12/12.2/12.2.1/12.2.1-35-s.js",
description: "'for(var eval = 42 in ...) {...}' throws SyntaxError in strict mode",
test: function testcase() {
'use strict';
try {
eval('for (var eval = 42 in null) {};');
return false;
}
catch (e) {
return (e instanceof SyntaxError);
}
},
strict:1,
precondition: function prereq() {
return fnSupportsStrict();
}
});

View File

@ -0,0 +1,47 @@
/// 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.
ES5Harness.registerTest( {
id: "12.2.1-36-s",
path: "TestCases/chapter12/12.2/12.2.1/12.2.1-36-s.js",
description: "'for(var arguments in ...) {...}' throws SyntaxError in strict mode",
test: function testcase() {
'use strict';
try {
eval('for (var arguments in null) {};');
return false;
}
catch (e) {
return (e instanceof SyntaxError);
}
},
strict:1,
precondition: function prereq() {
return fnSupportsStrict();
}
});

View File

@ -0,0 +1,47 @@
/// 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.
ES5Harness.registerTest( {
id: "12.2.1-37-s",
path: "TestCases/chapter12/12.2/12.2.1/12.2.1-37-s.js",
description: "'for(var arguments = 42 in ...) {...}' throws SyntaxError in strict mode",
test: function testcase() {
'use strict';
try {
eval('for (var arguments = 42 in null) {};');
return false;
}
catch (e) {
return (e instanceof SyntaxError);
}
},
strict:1,
precondition: function prereq() {
return fnSupportsStrict();
}
});

View File

@ -0,0 +1,43 @@
/// 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.
ES5Harness.registerTest({
id: "13.2-5-s",
path: "TestCases/chapter13/13.2/13.2-5-s.js",
description: "StrictMode - reading a property named 'caller' of function objects is not allowed outside the function",
test: function testcase() {
var foo = new Function("'use strict';");
try {
var temp = foo.caller;
return false;
}
catch (e) {
return e instanceof TypeError;
}
},
strict : 1,
precondition: function prereq() {
return fnSupportsStrict();
}
});

View File

@ -0,0 +1,43 @@
/// 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.
ES5Harness.registerTest({
id: "13.2-7-s",
path: "TestCases/chapter13/13.2/13.2-7-s.js",
description: "StrictMode - enumerating over a function object looking for 'caller' fails outside of the function",
test: function testcase() {
var foo = new Function("'use strict';");
for (var tempIndex in foo) {
if (tempIndex === "caller") {
return false;
}
}
return true;
},
strict : 1,
precondition: function prereq() {
return fnSupportsStrict();
}
});

View File

@ -0,0 +1,37 @@
/// 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.
ES5Harness.registerTest({
id: "13.2-8-s",
path: "TestCases/chapter13/13.2/13.2-8-s.js",
description: "StrictMode - enumerating over a function object looking for 'caller' fails inside the function",
test: function testcase() {
var foo = new Function("'use strict'; for (var tempIndex in this) {if (tempIndex===\"caller\") {return false;}}; return true;");
return foo();
},
strict : 1,
precondition: function prereq() {
return fnSupportsStrict();
}
});

View File

@ -25,7 +25,7 @@ ES5Harness.registerTest({
path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-153.js",
description: "Object.defineProperty - 'O' is an Array, 'name' is the length prosperty of 'O', test RangeError is thrown when the [[Value]] field of 'desc' is a negative non-integer values (15.4.5.1 step 3.c)",
description: "Object.defineProperty - 'O' is an Array, 'name' is the length property of 'O', test RangeError is thrown when the [[Value]] field of 'desc' is a negative non-integer values (15.4.5.1 step 3.c)",
test: function testcase() {

View File

@ -37,7 +37,7 @@ ES5Harness.registerTest({
var hasProperty = newArr.hasOwnProperty("0");
var instanceOfVerify = newArr[0] instanceof Number;
var instanceOfVerify = typeof newArr[0]==="number";
var verifyValue = false;
verifyValue = newArr[0] === 101;

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1 +1 @@
{"date":"2011-06-09","numTests":10865,"testSuite":["resources/scripts/testcases/07_Lexical_Conventions.json","resources/scripts/testcases/08_Types.json","resources/scripts/testcases/09_Type_Conversion.json","resources/scripts/testcases/10_Execution_Contexts.json","resources/scripts/testcases/11.10_Binary_Bitwise_Operators.json","resources/scripts/testcases/11.11_Binary_Logical_Operators.json","resources/scripts/testcases/11.12_Conditional_Operator.json","resources/scripts/testcases/11.13_Assignment_Operators.json","resources/scripts/testcases/11.14_Comma_Operator.json","resources/scripts/testcases/11.1_Primary_Expressions.json","resources/scripts/testcases/11.2_Left_Hand_Side_Expressions.json","resources/scripts/testcases/11.3_PostfixExpressions.json","resources/scripts/testcases/11.4_Unary_Operators.json","resources/scripts/testcases/11.5_Multiplicative_Operators.json","resources/scripts/testcases/11.6_Additive_Operators.json","resources/scripts/testcases/11.7_Bitwise_Shift_Operators.json","resources/scripts/testcases/11.8_Relational_Operators.json","resources/scripts/testcases/11.9_Equality_Operators.json","resources/scripts/testcases/12_Statement.json","resources/scripts/testcases/13_Function_Definition.json","resources/scripts/testcases/14_Program.json","resources/scripts/testcases/15.10_RegExp_Objects.json","resources/scripts/testcases/15.11_Error_Objects.json","resources/scripts/testcases/15.1_The_Global_Object.json","resources/scripts/testcases/15.2_Object_Objects.json","resources/scripts/testcases/15.3_Function_Objects.json","resources/scripts/testcases/15.4_Array_Objects.json","resources/scripts/testcases/15.5_String_Objects.json","resources/scripts/testcases/15.6_Boolean_Objects.json","resources/scripts/testcases/15.7_Number_Objects.json","resources/scripts/testcases/15.8_The_Math_Object.json","resources/scripts/testcases/15.9_Date_Objects.json","resources/scripts/testcases/chapter07.json","resources/scripts/testcases/chapter08.json","resources/scripts/testcases/chapter10.json","resources/scripts/testcases/chapter11.json","resources/scripts/testcases/chapter12.json","resources/scripts/testcases/chapter13.json","resources/scripts/testcases/chapter14.json","resources/scripts/testcases/15.1.json","resources/scripts/testcases/15.10.json","resources/scripts/testcases/15.11.json","resources/scripts/testcases/15.12.json","resources/scripts/testcases/15.2.3.1.json","resources/scripts/testcases/15.2.3.10.json","resources/scripts/testcases/15.2.3.11.json","resources/scripts/testcases/15.2.3.12.json","resources/scripts/testcases/15.2.3.13.json","resources/scripts/testcases/15.2.3.14.json","resources/scripts/testcases/15.2.3.2.json","resources/scripts/testcases/15.2.3.3.json","resources/scripts/testcases/15.2.3.4.json","resources/scripts/testcases/15.2.3.5.json","resources/scripts/testcases/15.2.3.6.json","resources/scripts/testcases/15.2.3.7.json","resources/scripts/testcases/15.2.3.8.json","resources/scripts/testcases/15.2.3.9.json","resources/scripts/testcases/15.2.4.json","resources/scripts/testcases/15.3.json","resources/scripts/testcases/15.4.3.json","resources/scripts/testcases/15.4.4.10.json","resources/scripts/testcases/15.4.4.12.json","resources/scripts/testcases/15.4.4.14.json","resources/scripts/testcases/15.4.4.15.json","resources/scripts/testcases/15.4.4.16.json","resources/scripts/testcases/15.4.4.17.json","resources/scripts/testcases/15.4.4.18.json","resources/scripts/testcases/15.4.4.19.json","resources/scripts/testcases/15.4.4.20.json","resources/scripts/testcases/15.4.4.21.json","resources/scripts/testcases/15.4.4.22.json","resources/scripts/testcases/15.4.4.4.json","resources/scripts/testcases/15.4.5.json","resources/scripts/testcases/15.5.json","resources/scripts/testcases/15.7.json","resources/scripts/testcases/15.9.json"],"version":"0.7.3"}
{"date":"2011-06-23","numTests":10887,"testSuite":["resources/scripts/testcases/07_Lexical_Conventions.json","resources/scripts/testcases/08_Types.json","resources/scripts/testcases/09_Type_Conversion.json","resources/scripts/testcases/10_Execution_Contexts.json","resources/scripts/testcases/11.10_Binary_Bitwise_Operators.json","resources/scripts/testcases/11.11_Binary_Logical_Operators.json","resources/scripts/testcases/11.12_Conditional_Operator.json","resources/scripts/testcases/11.13_Assignment_Operators.json","resources/scripts/testcases/11.14_Comma_Operator.json","resources/scripts/testcases/11.1_Primary_Expressions.json","resources/scripts/testcases/11.2_Left_Hand_Side_Expressions.json","resources/scripts/testcases/11.3_PostfixExpressions.json","resources/scripts/testcases/11.4_Unary_Operators.json","resources/scripts/testcases/11.5_Multiplicative_Operators.json","resources/scripts/testcases/11.6_Additive_Operators.json","resources/scripts/testcases/11.7_Bitwise_Shift_Operators.json","resources/scripts/testcases/11.8_Relational_Operators.json","resources/scripts/testcases/11.9_Equality_Operators.json","resources/scripts/testcases/12_Statement.json","resources/scripts/testcases/13_Function_Definition.json","resources/scripts/testcases/14_Program.json","resources/scripts/testcases/15.10_RegExp_Objects.json","resources/scripts/testcases/15.11_Error_Objects.json","resources/scripts/testcases/15.1_The_Global_Object.json","resources/scripts/testcases/15.2_Object_Objects.json","resources/scripts/testcases/15.3_Function_Objects.json","resources/scripts/testcases/15.4_Array_Objects.json","resources/scripts/testcases/15.5_String_Objects.json","resources/scripts/testcases/15.6_Boolean_Objects.json","resources/scripts/testcases/15.7_Number_Objects.json","resources/scripts/testcases/15.8_The_Math_Object.json","resources/scripts/testcases/15.9_Date_Objects.json","resources/scripts/testcases/chapter07.json","resources/scripts/testcases/chapter08.json","resources/scripts/testcases/chapter10.json","resources/scripts/testcases/chapter11.json","resources/scripts/testcases/chapter12.json","resources/scripts/testcases/chapter13.json","resources/scripts/testcases/chapter14.json","resources/scripts/testcases/15.1.json","resources/scripts/testcases/15.10.json","resources/scripts/testcases/15.11.json","resources/scripts/testcases/15.12.json","resources/scripts/testcases/15.2.3.1.json","resources/scripts/testcases/15.2.3.10.json","resources/scripts/testcases/15.2.3.11.json","resources/scripts/testcases/15.2.3.12.json","resources/scripts/testcases/15.2.3.13.json","resources/scripts/testcases/15.2.3.14.json","resources/scripts/testcases/15.2.3.2.json","resources/scripts/testcases/15.2.3.3.json","resources/scripts/testcases/15.2.3.4.json","resources/scripts/testcases/15.2.3.5.json","resources/scripts/testcases/15.2.3.6.json","resources/scripts/testcases/15.2.3.7.json","resources/scripts/testcases/15.2.3.8.json","resources/scripts/testcases/15.2.3.9.json","resources/scripts/testcases/15.2.4.json","resources/scripts/testcases/15.3.json","resources/scripts/testcases/15.4.3.json","resources/scripts/testcases/15.4.4.10.json","resources/scripts/testcases/15.4.4.12.json","resources/scripts/testcases/15.4.4.14.json","resources/scripts/testcases/15.4.4.15.json","resources/scripts/testcases/15.4.4.16.json","resources/scripts/testcases/15.4.4.17.json","resources/scripts/testcases/15.4.4.18.json","resources/scripts/testcases/15.4.4.19.json","resources/scripts/testcases/15.4.4.20.json","resources/scripts/testcases/15.4.4.21.json","resources/scripts/testcases/15.4.4.22.json","resources/scripts/testcases/15.4.4.4.json","resources/scripts/testcases/15.4.5.json","resources/scripts/testcases/15.5.json","resources/scripts/testcases/15.7.json","resources/scripts/testcases/15.9.json"],"version":"0.7.4"}