mirror of
https://github.com/tc39/test262.git
synced 2025-05-24 08:40:30 +02:00
Microsoft's latest contributions for test262 based on Internet Explorer Test Center additions/fixes
for the Build 2011 conference.
This commit is contained in:
parent
1f6f66cb19
commit
c21525a328
37
external/contributions/Microsoft/ietestcenter_build_2011/TestCases/chapter07/7.3/7.3-1.js
vendored
Normal file
37
external/contributions/Microsoft/ietestcenter_build_2011/TestCases/chapter07/7.3/7.3-1.js
vendored
Normal 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-1",
|
||||||
|
|
||||||
|
path: "TestCases/chapter07/7.3/7.3-1.js",
|
||||||
|
|
||||||
|
description: "7.3 - ES5 recognizes the character <LS> (\\u2028) as line terminators when parsing statements",
|
||||||
|
|
||||||
|
test: function testcase() {
|
||||||
|
eval("var test7_3_1\u2028prop = 66;");
|
||||||
|
return (prop === 66) && ((typeof test7_3_1) === "undefined");
|
||||||
|
},
|
||||||
|
|
||||||
|
precondition: function prereq() {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
});
|
41
external/contributions/Microsoft/ietestcenter_build_2011/TestCases/chapter07/7.3/7.3-10.js
vendored
Normal file
41
external/contributions/Microsoft/ietestcenter_build_2011/TestCases/chapter07/7.3/7.3-10.js
vendored
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
/// 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-10",
|
||||||
|
|
||||||
|
path: "TestCases/chapter07/7.3/7.3-10.js",
|
||||||
|
|
||||||
|
description: "7.3 - ES5 recognizes the character <PS> (\\u2029) as a NonEscapeCharacter",
|
||||||
|
|
||||||
|
test: function testcase() {
|
||||||
|
try {
|
||||||
|
eval("var prop = \\u2029;");
|
||||||
|
return false;
|
||||||
|
} catch (e) {
|
||||||
|
return e instanceof SyntaxError;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
precondition: function prereq() {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
});
|
40
external/contributions/Microsoft/ietestcenter_build_2011/TestCases/chapter07/7.3/7.3-11.js
vendored
Normal file
40
external/contributions/Microsoft/ietestcenter_build_2011/TestCases/chapter07/7.3/7.3-11.js
vendored
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
/// 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-11",
|
||||||
|
|
||||||
|
path: "TestCases/chapter07/7.3/7.3-11.js",
|
||||||
|
|
||||||
|
description: "7.3 - ES5 specifies that a multiline comment that contains a line terminator character <LS> (\\u2028) must be treated as a single line terminator for the purposes of semicolon insertion",
|
||||||
|
|
||||||
|
test: function testcase() {
|
||||||
|
/*MultiLine
|
||||||
|
Comments
|
||||||
|
\u2028 var = ;
|
||||||
|
*/
|
||||||
|
return true;
|
||||||
|
},
|
||||||
|
|
||||||
|
precondition: function prereq() {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
});
|
40
external/contributions/Microsoft/ietestcenter_build_2011/TestCases/chapter07/7.3/7.3-12.js
vendored
Normal file
40
external/contributions/Microsoft/ietestcenter_build_2011/TestCases/chapter07/7.3/7.3-12.js
vendored
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
/// 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-12",
|
||||||
|
|
||||||
|
path: "TestCases/chapter07/7.3/7.3-12.js",
|
||||||
|
|
||||||
|
description: "7.3 - ES5 specifies that a multiline comment that contains a line terminator character <PS> (\\u2029) must be treated as a single line terminator for the purposes of semicolon insertion",
|
||||||
|
|
||||||
|
test: function testcase() {
|
||||||
|
/*MultiLine
|
||||||
|
Comments
|
||||||
|
\u2029 var = ;
|
||||||
|
*/
|
||||||
|
return true;
|
||||||
|
},
|
||||||
|
|
||||||
|
precondition: function prereq() {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
});
|
40
external/contributions/Microsoft/ietestcenter_build_2011/TestCases/chapter07/7.3/7.3-13.js
vendored
Normal file
40
external/contributions/Microsoft/ietestcenter_build_2011/TestCases/chapter07/7.3/7.3-13.js
vendored
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
/// 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-13",
|
||||||
|
|
||||||
|
path: "TestCases/chapter07/7.3/7.3-13.js",
|
||||||
|
|
||||||
|
description: "7.3 - ES5 specifies that a multiline comment that contains a line terminator character <CR> (\\u000D) must be treated as a single line terminator for the purposes of semicolon insertion",
|
||||||
|
|
||||||
|
test: function testcase() {
|
||||||
|
/*MultiLine
|
||||||
|
Comments
|
||||||
|
\u000D var = ;
|
||||||
|
*/
|
||||||
|
return true;
|
||||||
|
},
|
||||||
|
|
||||||
|
precondition: function prereq() {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
});
|
40
external/contributions/Microsoft/ietestcenter_build_2011/TestCases/chapter07/7.3/7.3-14.js
vendored
Normal file
40
external/contributions/Microsoft/ietestcenter_build_2011/TestCases/chapter07/7.3/7.3-14.js
vendored
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
/// 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-14",
|
||||||
|
|
||||||
|
path: "TestCases/chapter07/7.3/7.3-14.js",
|
||||||
|
|
||||||
|
description: "7.3 - ES5 specifies that a multiline comment that contains a line terminator character <LF> (\\u000A) must be treated as a single line terminator for the purposes of semicolon insertion",
|
||||||
|
|
||||||
|
test: function testcase() {
|
||||||
|
/*MultiLine
|
||||||
|
Comments
|
||||||
|
\u000A var = ;
|
||||||
|
*/
|
||||||
|
return true;
|
||||||
|
},
|
||||||
|
|
||||||
|
precondition: function prereq() {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
});
|
37
external/contributions/Microsoft/ietestcenter_build_2011/TestCases/chapter07/7.3/7.3-15.js
vendored
Normal file
37
external/contributions/Microsoft/ietestcenter_build_2011/TestCases/chapter07/7.3/7.3-15.js
vendored
Normal 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-15",
|
||||||
|
|
||||||
|
path: "TestCases/chapter07/7.3/7.3-15.js",
|
||||||
|
|
||||||
|
description: "7.3 - ES5 recognize <BOM> (\\uFFFF) as a whitespace character",
|
||||||
|
|
||||||
|
test: function testcase() {
|
||||||
|
var prop = "a\uFFFFa";
|
||||||
|
return prop.length === 3 && prop !== "aa" && prop[1] === "\uFFFF";
|
||||||
|
},
|
||||||
|
|
||||||
|
precondition: function prereq() {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
});
|
37
external/contributions/Microsoft/ietestcenter_build_2011/TestCases/chapter07/7.3/7.3-2.js
vendored
Normal file
37
external/contributions/Microsoft/ietestcenter_build_2011/TestCases/chapter07/7.3/7.3-2.js
vendored
Normal 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-2",
|
||||||
|
|
||||||
|
path: "TestCases/chapter07/7.3/7.3-2.js",
|
||||||
|
|
||||||
|
description: "7.3 - ES5 recognizes the character <PS> (\\u2029) as line terminators when parsing statements",
|
||||||
|
|
||||||
|
test: function testcase() {
|
||||||
|
eval("var test7_3_2\u2029prop = 66;");
|
||||||
|
return (prop===66) && ((typeof test7_3_2) === "undefined");
|
||||||
|
},
|
||||||
|
|
||||||
|
precondition: function prereq() {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
});
|
41
external/contributions/Microsoft/ietestcenter_build_2011/TestCases/chapter07/7.3/7.3-3.js
vendored
Normal file
41
external/contributions/Microsoft/ietestcenter_build_2011/TestCases/chapter07/7.3/7.3-3.js
vendored
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
/// 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-3",
|
||||||
|
|
||||||
|
path: "TestCases/chapter07/7.3/7.3-3.js",
|
||||||
|
|
||||||
|
description: "7.3 - ES5 recognizes the character <LS> (\\u2028) as terminating SingleLineComments",
|
||||||
|
|
||||||
|
test: function testcase() {
|
||||||
|
try {
|
||||||
|
eval("//Single Line Comments\u2028 var =;");
|
||||||
|
return false;
|
||||||
|
} catch (e) {
|
||||||
|
return e instanceof SyntaxError;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
precondition: function prereq() {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
});
|
41
external/contributions/Microsoft/ietestcenter_build_2011/TestCases/chapter07/7.3/7.3-4.js
vendored
Normal file
41
external/contributions/Microsoft/ietestcenter_build_2011/TestCases/chapter07/7.3/7.3-4.js
vendored
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
/// 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-4",
|
||||||
|
|
||||||
|
path: "TestCases/chapter07/7.3/7.3-4.js",
|
||||||
|
|
||||||
|
description: "7.3 - ES5 recognizes the character <PS> (\\u2029) as terminating SingleLineComments",
|
||||||
|
|
||||||
|
test: function testcase() {
|
||||||
|
try {
|
||||||
|
eval("//Single Line Comments\u2029 var =;");
|
||||||
|
return false;
|
||||||
|
} catch (e) {
|
||||||
|
return e instanceof SyntaxError;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
precondition: function prereq() {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
});
|
37
external/contributions/Microsoft/ietestcenter_build_2011/TestCases/chapter07/7.3/7.3-5.js
vendored
Normal file
37
external/contributions/Microsoft/ietestcenter_build_2011/TestCases/chapter07/7.3/7.3-5.js
vendored
Normal 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;
|
||||||
|
}
|
||||||
|
});
|
37
external/contributions/Microsoft/ietestcenter_build_2011/TestCases/chapter07/7.3/7.3-6.js
vendored
Normal file
37
external/contributions/Microsoft/ietestcenter_build_2011/TestCases/chapter07/7.3/7.3-6.js
vendored
Normal 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;
|
||||||
|
}
|
||||||
|
});
|
42
external/contributions/Microsoft/ietestcenter_build_2011/TestCases/chapter07/7.3/7.3-7.js
vendored
Normal file
42
external/contributions/Microsoft/ietestcenter_build_2011/TestCases/chapter07/7.3/7.3-7.js
vendored
Normal file
@ -0,0 +1,42 @@
|
|||||||
|
/// 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-7",
|
||||||
|
|
||||||
|
path: "TestCases/chapter07/7.3/7.3-7.js",
|
||||||
|
|
||||||
|
description: "7.3 - ES5 recognizes the character <LS> (\\u2028) as terminating regular expression literals",
|
||||||
|
|
||||||
|
test: function testcase() {
|
||||||
|
try {
|
||||||
|
eval("var regExp = /[\u2028]/");
|
||||||
|
regExp.test("");
|
||||||
|
return false;
|
||||||
|
} catch (e) {
|
||||||
|
return e instanceof SyntaxError;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
precondition: function prereq() {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
});
|
42
external/contributions/Microsoft/ietestcenter_build_2011/TestCases/chapter07/7.3/7.3-8.js
vendored
Normal file
42
external/contributions/Microsoft/ietestcenter_build_2011/TestCases/chapter07/7.3/7.3-8.js
vendored
Normal file
@ -0,0 +1,42 @@
|
|||||||
|
/// 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-8",
|
||||||
|
|
||||||
|
path: "TestCases/chapter07/7.3/7.3-8.js",
|
||||||
|
|
||||||
|
description: "7.3 - ES5 recognizes the character <PS> (\\u2029) as terminating regular expression literals",
|
||||||
|
|
||||||
|
test: function testcase() {
|
||||||
|
try {
|
||||||
|
eval("var regExp = /[\u2029]/");
|
||||||
|
regExp.test("");
|
||||||
|
return false;
|
||||||
|
} catch (e) {
|
||||||
|
return e instanceof SyntaxError;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
precondition: function prereq() {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
});
|
41
external/contributions/Microsoft/ietestcenter_build_2011/TestCases/chapter07/7.3/7.3-9.js
vendored
Normal file
41
external/contributions/Microsoft/ietestcenter_build_2011/TestCases/chapter07/7.3/7.3-9.js
vendored
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
/// 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-9",
|
||||||
|
|
||||||
|
path: "TestCases/chapter07/7.3/7.3-9.js",
|
||||||
|
|
||||||
|
description: "7.3 - ES5 recognizes the character <LS> (\\u2028) as a NonEscapeCharacter",
|
||||||
|
|
||||||
|
test: function testcase() {
|
||||||
|
try {
|
||||||
|
eval("var prop = \\u2028;");
|
||||||
|
return false;
|
||||||
|
} catch (e) {
|
||||||
|
return e instanceof SyntaxError;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
precondition: function prereq() {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
});
|
41
external/contributions/Microsoft/ietestcenter_build_2011/TestCases/chapter07/7.6/7.6-1.js
vendored
Normal file
41
external/contributions/Microsoft/ietestcenter_build_2011/TestCases/chapter07/7.6/7.6-1.js
vendored
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
/// 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.6-1",
|
||||||
|
|
||||||
|
path: "TestCases/chapter07/7.6/7.6-1.js",
|
||||||
|
|
||||||
|
description: "7.6 - SyntaxError expected: reserved words used as Identifier Names in UTF8: \u006eull (null)",
|
||||||
|
|
||||||
|
test: function testcase() {
|
||||||
|
try {
|
||||||
|
eval("var \u006eull = 123;");
|
||||||
|
return false;
|
||||||
|
} catch (e) {
|
||||||
|
return e instanceof SyntaxError;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
precondition: function prereq() {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
});
|
41
external/contributions/Microsoft/ietestcenter_build_2011/TestCases/chapter07/7.6/7.6-10.js
vendored
Normal file
41
external/contributions/Microsoft/ietestcenter_build_2011/TestCases/chapter07/7.6/7.6-10.js
vendored
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
/// 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.6-10",
|
||||||
|
|
||||||
|
path: "TestCases/chapter07/7.6/7.6-10.js",
|
||||||
|
|
||||||
|
description: "7.6 - SyntaxError expected: reserved words used as Identifier Names in UTF8: n\u0065w (new)",
|
||||||
|
|
||||||
|
test: function testcase() {
|
||||||
|
try {
|
||||||
|
eval("var n\u0065w = 123;");
|
||||||
|
return false;
|
||||||
|
} catch (e) {
|
||||||
|
return e instanceof SyntaxError;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
precondition: function prereq() {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
});
|
41
external/contributions/Microsoft/ietestcenter_build_2011/TestCases/chapter07/7.6/7.6-11.js
vendored
Normal file
41
external/contributions/Microsoft/ietestcenter_build_2011/TestCases/chapter07/7.6/7.6-11.js
vendored
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
/// 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.6-11",
|
||||||
|
|
||||||
|
path: "TestCases/chapter07/7.6/7.6-11.js",
|
||||||
|
|
||||||
|
description: "7.6 - SyntaxError expected: reserved words used as Identifier Names in UTF8: va\u0072 (var)",
|
||||||
|
|
||||||
|
test: function testcase() {
|
||||||
|
try {
|
||||||
|
eval("var va\u0072 = 123;");
|
||||||
|
return false;
|
||||||
|
} catch (e) {
|
||||||
|
return e instanceof SyntaxError;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
precondition: function prereq() {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
});
|
41
external/contributions/Microsoft/ietestcenter_build_2011/TestCases/chapter07/7.6/7.6-12.js
vendored
Normal file
41
external/contributions/Microsoft/ietestcenter_build_2011/TestCases/chapter07/7.6/7.6-12.js
vendored
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
/// 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.6-12",
|
||||||
|
|
||||||
|
path: "TestCases/chapter07/7.6/7.6-12.js",
|
||||||
|
|
||||||
|
description: "7.6 - SyntaxError expected: reserved words used as Identifier Names in UTF8: \u0074\u0072\u0079 (try)",
|
||||||
|
|
||||||
|
test: function testcase() {
|
||||||
|
try {
|
||||||
|
eval("var \u0074\u0072\u0079 = 123;");
|
||||||
|
return false;
|
||||||
|
} catch (e) {
|
||||||
|
return e instanceof SyntaxError;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
precondition: function prereq() {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
});
|
41
external/contributions/Microsoft/ietestcenter_build_2011/TestCases/chapter07/7.6/7.6-13.js
vendored
Normal file
41
external/contributions/Microsoft/ietestcenter_build_2011/TestCases/chapter07/7.6/7.6-13.js
vendored
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
/// 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.6-13",
|
||||||
|
|
||||||
|
path: "TestCases/chapter07/7.6/7.6-13.js",
|
||||||
|
|
||||||
|
description: "7.6 - SyntaxError expected: reserved words used as Identifier Names in UTF8: \u0063atch (catch)",
|
||||||
|
|
||||||
|
test: function testcase() {
|
||||||
|
try {
|
||||||
|
eval("var \u0063atch = 123;");
|
||||||
|
return false;
|
||||||
|
} catch (e) {
|
||||||
|
return e instanceof SyntaxError;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
precondition: function prereq() {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
});
|
41
external/contributions/Microsoft/ietestcenter_build_2011/TestCases/chapter07/7.6/7.6-14.js
vendored
Normal file
41
external/contributions/Microsoft/ietestcenter_build_2011/TestCases/chapter07/7.6/7.6-14.js
vendored
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
/// 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.6-14",
|
||||||
|
|
||||||
|
path: "TestCases/chapter07/7.6/7.6-14.js",
|
||||||
|
|
||||||
|
description: "7.6 - SyntaxError expected: reserved words used as Identifier Names in UTF8: fina\u006cly (finally)",
|
||||||
|
|
||||||
|
test: function testcase() {
|
||||||
|
try {
|
||||||
|
eval("var fina\u006cly = 123;");
|
||||||
|
return false;
|
||||||
|
} catch (e) {
|
||||||
|
return e instanceof SyntaxError;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
precondition: function prereq() {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
});
|
41
external/contributions/Microsoft/ietestcenter_build_2011/TestCases/chapter07/7.6/7.6-15.js
vendored
Normal file
41
external/contributions/Microsoft/ietestcenter_build_2011/TestCases/chapter07/7.6/7.6-15.js
vendored
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
/// 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.6-15",
|
||||||
|
|
||||||
|
path: "TestCases/chapter07/7.6/7.6-15.js",
|
||||||
|
|
||||||
|
description: "7.6 - SyntaxError expected: reserved words used as Identifier Names in UTF8: retur\u006e (return)",
|
||||||
|
|
||||||
|
test: function testcase() {
|
||||||
|
try {
|
||||||
|
eval("var retur\u006e = 123;");
|
||||||
|
return false;
|
||||||
|
} catch (e) {
|
||||||
|
return e instanceof SyntaxError;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
precondition: function prereq() {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
});
|
41
external/contributions/Microsoft/ietestcenter_build_2011/TestCases/chapter07/7.6/7.6-16.js
vendored
Normal file
41
external/contributions/Microsoft/ietestcenter_build_2011/TestCases/chapter07/7.6/7.6-16.js
vendored
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
/// 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.6-16",
|
||||||
|
|
||||||
|
path: "TestCases/chapter07/7.6/7.6-16.js",
|
||||||
|
|
||||||
|
description: "7.6 - SyntaxError expected: reserved words used as Identifier Names in UTF8: \u0076\u006f\u0069\u0064 (void)",
|
||||||
|
|
||||||
|
test: function testcase() {
|
||||||
|
try {
|
||||||
|
eval("var \u0076\u006f\u0069\u0064 = 123;");
|
||||||
|
return false;
|
||||||
|
} catch (e) {
|
||||||
|
return e instanceof SyntaxError;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
precondition: function prereq() {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
});
|
41
external/contributions/Microsoft/ietestcenter_build_2011/TestCases/chapter07/7.6/7.6-17.js
vendored
Normal file
41
external/contributions/Microsoft/ietestcenter_build_2011/TestCases/chapter07/7.6/7.6-17.js
vendored
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
/// 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.6-17",
|
||||||
|
|
||||||
|
path: "TestCases/chapter07/7.6/7.6-17.js",
|
||||||
|
|
||||||
|
description: "7.6 - SyntaxError expected: reserved words used as Identifier Names in UTF8: \u0063ontinue (continue)",
|
||||||
|
|
||||||
|
test: function testcase() {
|
||||||
|
try {
|
||||||
|
eval("var \u0063ontinue = 123;");
|
||||||
|
return false;
|
||||||
|
} catch (e) {
|
||||||
|
return e instanceof SyntaxError;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
precondition: function prereq() {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
});
|
41
external/contributions/Microsoft/ietestcenter_build_2011/TestCases/chapter07/7.6/7.6-18.js
vendored
Normal file
41
external/contributions/Microsoft/ietestcenter_build_2011/TestCases/chapter07/7.6/7.6-18.js
vendored
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
/// 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.6-18",
|
||||||
|
|
||||||
|
path: "TestCases/chapter07/7.6/7.6-18.js",
|
||||||
|
|
||||||
|
description: "7.6 - SyntaxError expected: reserved words used as Identifier Names in UTF8: f\u006fr (for)",
|
||||||
|
|
||||||
|
test: function testcase() {
|
||||||
|
try {
|
||||||
|
eval("var f\u006fr = 123;");
|
||||||
|
return false;
|
||||||
|
} catch (e) {
|
||||||
|
return e instanceof SyntaxError;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
precondition: function prereq() {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
});
|
41
external/contributions/Microsoft/ietestcenter_build_2011/TestCases/chapter07/7.6/7.6-19.js
vendored
Normal file
41
external/contributions/Microsoft/ietestcenter_build_2011/TestCases/chapter07/7.6/7.6-19.js
vendored
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
/// 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.6-19",
|
||||||
|
|
||||||
|
path: "TestCases/chapter07/7.6/7.6-19.js",
|
||||||
|
|
||||||
|
description: "7.6 - SyntaxError expected: reserved words used as Identifier Names in UTF8: switc\u0068 (switch)",
|
||||||
|
|
||||||
|
test: function testcase() {
|
||||||
|
try {
|
||||||
|
eval("var switc\u0068 = 123;");
|
||||||
|
return false;
|
||||||
|
} catch (e) {
|
||||||
|
return e instanceof SyntaxError;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
precondition: function prereq() {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
});
|
41
external/contributions/Microsoft/ietestcenter_build_2011/TestCases/chapter07/7.6/7.6-2.js
vendored
Normal file
41
external/contributions/Microsoft/ietestcenter_build_2011/TestCases/chapter07/7.6/7.6-2.js
vendored
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
/// 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.6-2",
|
||||||
|
|
||||||
|
path: "TestCases/chapter07/7.6/7.6-2.js",
|
||||||
|
|
||||||
|
description: "7.6 - SyntaxError expected: reserved words used as Identifier Names in UTF8: tr\u0075e (true)",
|
||||||
|
|
||||||
|
test: function testcase() {
|
||||||
|
try {
|
||||||
|
eval("var tr\u0075e = 123;");
|
||||||
|
return false;
|
||||||
|
} catch (e) {
|
||||||
|
return e instanceof SyntaxError;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
precondition: function prereq() {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
});
|
41
external/contributions/Microsoft/ietestcenter_build_2011/TestCases/chapter07/7.6/7.6-20.js
vendored
Normal file
41
external/contributions/Microsoft/ietestcenter_build_2011/TestCases/chapter07/7.6/7.6-20.js
vendored
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
/// 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.6-20",
|
||||||
|
|
||||||
|
path: "TestCases/chapter07/7.6/7.6-20.js",
|
||||||
|
|
||||||
|
description: "7.6 - SyntaxError expected: reserved words used as Identifier Names in UTF8: \u0077\u0068\u0069\u006c\u0065 (while)",
|
||||||
|
|
||||||
|
test: function testcase() {
|
||||||
|
try {
|
||||||
|
eval("var \u0077\u0068\u0069\u006c\u0065 = 123;");
|
||||||
|
return false;
|
||||||
|
} catch (e) {
|
||||||
|
return e instanceof SyntaxError;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
precondition: function prereq() {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
});
|
41
external/contributions/Microsoft/ietestcenter_build_2011/TestCases/chapter07/7.6/7.6-21.js
vendored
Normal file
41
external/contributions/Microsoft/ietestcenter_build_2011/TestCases/chapter07/7.6/7.6-21.js
vendored
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
/// 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.6-21",
|
||||||
|
|
||||||
|
path: "TestCases/chapter07/7.6/7.6-21.js",
|
||||||
|
|
||||||
|
description: "7.6 - SyntaxError expected: reserved words used as Identifier Names in UTF8: \u0064ebugger (debugger)",
|
||||||
|
|
||||||
|
test: function testcase() {
|
||||||
|
try {
|
||||||
|
eval("var \u0064ebugger = 123;");
|
||||||
|
return false;
|
||||||
|
} catch (e) {
|
||||||
|
return e instanceof SyntaxError;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
precondition: function prereq() {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
});
|
41
external/contributions/Microsoft/ietestcenter_build_2011/TestCases/chapter07/7.6/7.6-22.js
vendored
Normal file
41
external/contributions/Microsoft/ietestcenter_build_2011/TestCases/chapter07/7.6/7.6-22.js
vendored
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
/// 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.6-22",
|
||||||
|
|
||||||
|
path: "TestCases/chapter07/7.6/7.6-22.js",
|
||||||
|
|
||||||
|
description: "7.6 - SyntaxError expected: reserved words used as Identifier Names in UTF8: func\u0074ion (function)",
|
||||||
|
|
||||||
|
test: function testcase() {
|
||||||
|
try {
|
||||||
|
eval("var func\u0074ion = 123;");
|
||||||
|
return false;
|
||||||
|
} catch (e) {
|
||||||
|
return e instanceof SyntaxError;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
precondition: function prereq() {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
});
|
41
external/contributions/Microsoft/ietestcenter_build_2011/TestCases/chapter07/7.6/7.6-23.js
vendored
Normal file
41
external/contributions/Microsoft/ietestcenter_build_2011/TestCases/chapter07/7.6/7.6-23.js
vendored
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
/// 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.6-23",
|
||||||
|
|
||||||
|
path: "TestCases/chapter07/7.6/7.6-23.js",
|
||||||
|
|
||||||
|
description: "7.6 - SyntaxError expected: reserved words used as Identifier Names in UTF8: thi\u0073 (this)",
|
||||||
|
|
||||||
|
test: function testcase() {
|
||||||
|
try {
|
||||||
|
eval("var thi\u0073 = 123;");
|
||||||
|
return false;
|
||||||
|
} catch (e) {
|
||||||
|
return e instanceof SyntaxError;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
precondition: function prereq() {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
});
|
41
external/contributions/Microsoft/ietestcenter_build_2011/TestCases/chapter07/7.6/7.6-24.js
vendored
Normal file
41
external/contributions/Microsoft/ietestcenter_build_2011/TestCases/chapter07/7.6/7.6-24.js
vendored
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
/// 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.6-24",
|
||||||
|
|
||||||
|
path: "TestCases/chapter07/7.6/7.6-24.js",
|
||||||
|
|
||||||
|
description: "7.6 - SyntaxError expected: reserved words used as Identifier Names in UTF8: \u0069\u0066 (if)",
|
||||||
|
|
||||||
|
test: function testcase() {
|
||||||
|
try {
|
||||||
|
eval("var \u0069\u0066 = 123;");
|
||||||
|
return false;
|
||||||
|
} catch (e) {
|
||||||
|
return e instanceof SyntaxError;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
precondition: function prereq() {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
});
|
41
external/contributions/Microsoft/ietestcenter_build_2011/TestCases/chapter07/7.6/7.6-25.js
vendored
Normal file
41
external/contributions/Microsoft/ietestcenter_build_2011/TestCases/chapter07/7.6/7.6-25.js
vendored
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
/// 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.6-25",
|
||||||
|
|
||||||
|
path: "TestCases/chapter07/7.6/7.6-25.js",
|
||||||
|
|
||||||
|
description: "7.6 - SyntaxError expected: reserved words used as Identifier Names in UTF8: \u0077ith (with)",
|
||||||
|
|
||||||
|
test: function testcase() {
|
||||||
|
try {
|
||||||
|
eval("var \u0077ith = 123;");
|
||||||
|
return false;
|
||||||
|
} catch (e) {
|
||||||
|
return e instanceof SyntaxError;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
precondition: function prereq() {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
});
|
41
external/contributions/Microsoft/ietestcenter_build_2011/TestCases/chapter07/7.6/7.6-26.js
vendored
Normal file
41
external/contributions/Microsoft/ietestcenter_build_2011/TestCases/chapter07/7.6/7.6-26.js
vendored
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
/// 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.6-26",
|
||||||
|
|
||||||
|
path: "TestCases/chapter07/7.6/7.6-26.js",
|
||||||
|
|
||||||
|
description: "7.6 - SyntaxError expected: reserved words used as Identifier Names in UTF8: def\u0061ult (default)",
|
||||||
|
|
||||||
|
test: function testcase() {
|
||||||
|
try {
|
||||||
|
eval("var def\u0061ult = 123;");
|
||||||
|
return false;
|
||||||
|
} catch (e) {
|
||||||
|
return e instanceof SyntaxError;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
precondition: function prereq() {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
});
|
41
external/contributions/Microsoft/ietestcenter_build_2011/TestCases/chapter07/7.6/7.6-27.js
vendored
Normal file
41
external/contributions/Microsoft/ietestcenter_build_2011/TestCases/chapter07/7.6/7.6-27.js
vendored
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
/// 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.6-27",
|
||||||
|
|
||||||
|
path: "TestCases/chapter07/7.6/7.6-27.js",
|
||||||
|
|
||||||
|
description: "7.6 - SyntaxError expected: reserved words used as Identifier Names in UTF8: thro\u0077 (throw)",
|
||||||
|
|
||||||
|
test: function testcase() {
|
||||||
|
try {
|
||||||
|
eval("var thro\u0077 = 123;");
|
||||||
|
return false;
|
||||||
|
} catch (e) {
|
||||||
|
return e instanceof SyntaxError;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
precondition: function prereq() {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
});
|
41
external/contributions/Microsoft/ietestcenter_build_2011/TestCases/chapter07/7.6/7.6-28.js
vendored
Normal file
41
external/contributions/Microsoft/ietestcenter_build_2011/TestCases/chapter07/7.6/7.6-28.js
vendored
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
/// 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.6-28",
|
||||||
|
|
||||||
|
path: "TestCases/chapter07/7.6/7.6-28.js",
|
||||||
|
|
||||||
|
description: "7.6 - SyntaxError expected: reserved words used as Identifier Names in UTF8: \u0069\u006e (in)",
|
||||||
|
|
||||||
|
test: function testcase() {
|
||||||
|
try {
|
||||||
|
eval("var \u0069\u006e = 123;");
|
||||||
|
return false;
|
||||||
|
} catch (e) {
|
||||||
|
return e instanceof SyntaxError;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
precondition: function prereq() {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
});
|
41
external/contributions/Microsoft/ietestcenter_build_2011/TestCases/chapter07/7.6/7.6-29.js
vendored
Normal file
41
external/contributions/Microsoft/ietestcenter_build_2011/TestCases/chapter07/7.6/7.6-29.js
vendored
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
/// 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.6-29",
|
||||||
|
|
||||||
|
path: "TestCases/chapter07/7.6/7.6-29.js",
|
||||||
|
|
||||||
|
description: "7.6 - SyntaxError expected: reserved words used as Identifier Names in UTF8: \u0064elete (delete)",
|
||||||
|
|
||||||
|
test: function testcase() {
|
||||||
|
try {
|
||||||
|
eval("var \u0064elete = 123;");
|
||||||
|
return false;
|
||||||
|
} catch (e) {
|
||||||
|
return e instanceof SyntaxError;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
precondition: function prereq() {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
});
|
41
external/contributions/Microsoft/ietestcenter_build_2011/TestCases/chapter07/7.6/7.6-3.js
vendored
Normal file
41
external/contributions/Microsoft/ietestcenter_build_2011/TestCases/chapter07/7.6/7.6-3.js
vendored
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
/// 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.6-3",
|
||||||
|
|
||||||
|
path: "TestCases/chapter07/7.6/7.6-3.js",
|
||||||
|
|
||||||
|
description: "7.6 - SyntaxError expected: reserved words used as Identifier Names in UTF8: fals\u0065 (false)",
|
||||||
|
|
||||||
|
test: function testcase() {
|
||||||
|
try {
|
||||||
|
eval("var fals\u0065 = 123;");
|
||||||
|
return false;
|
||||||
|
} catch (e) {
|
||||||
|
return e instanceof SyntaxError;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
precondition: function prereq() {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
});
|
41
external/contributions/Microsoft/ietestcenter_build_2011/TestCases/chapter07/7.6/7.6-30.js
vendored
Normal file
41
external/contributions/Microsoft/ietestcenter_build_2011/TestCases/chapter07/7.6/7.6-30.js
vendored
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
/// 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.6-30",
|
||||||
|
|
||||||
|
path: "TestCases/chapter07/7.6/7.6-30.js",
|
||||||
|
|
||||||
|
description: "7.6 - SyntaxError expected: reserved words used as Identifier Names in UTF8: cla\u0073s (class)",
|
||||||
|
|
||||||
|
test: function testcase() {
|
||||||
|
try {
|
||||||
|
eval("var cla\u0073s = 123;");
|
||||||
|
return false;
|
||||||
|
} catch (e) {
|
||||||
|
return e instanceof SyntaxError;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
precondition: function prereq() {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
});
|
41
external/contributions/Microsoft/ietestcenter_build_2011/TestCases/chapter07/7.6/7.6-31.js
vendored
Normal file
41
external/contributions/Microsoft/ietestcenter_build_2011/TestCases/chapter07/7.6/7.6-31.js
vendored
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
/// 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.6-31",
|
||||||
|
|
||||||
|
path: "TestCases/chapter07/7.6/7.6-31.js",
|
||||||
|
|
||||||
|
description: "7.6 - SyntaxError expected: reserved words used as Identifier Names in UTF8: extend\u0073 (extends)",
|
||||||
|
|
||||||
|
test: function testcase() {
|
||||||
|
try {
|
||||||
|
eval("var extend\u0073 = 123;");
|
||||||
|
return false;
|
||||||
|
} catch (e) {
|
||||||
|
return e instanceof SyntaxError;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
precondition: function prereq() {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
});
|
41
external/contributions/Microsoft/ietestcenter_build_2011/TestCases/chapter07/7.6/7.6-32.js
vendored
Normal file
41
external/contributions/Microsoft/ietestcenter_build_2011/TestCases/chapter07/7.6/7.6-32.js
vendored
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
/// 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.6-32",
|
||||||
|
|
||||||
|
path: "TestCases/chapter07/7.6/7.6-32.js",
|
||||||
|
|
||||||
|
description: "7.6 - SyntaxError expected: reserved words used as Identifier Names in UTF8: \u0065\u006e\u0075\u006d (enum)",
|
||||||
|
|
||||||
|
test: function testcase() {
|
||||||
|
try {
|
||||||
|
eval("var \u0065\u006e\u0075\u006d = 123;");
|
||||||
|
return false;
|
||||||
|
} catch (e) {
|
||||||
|
return e instanceof SyntaxError;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
precondition: function prereq() {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
});
|
41
external/contributions/Microsoft/ietestcenter_build_2011/TestCases/chapter07/7.6/7.6-33.js
vendored
Normal file
41
external/contributions/Microsoft/ietestcenter_build_2011/TestCases/chapter07/7.6/7.6-33.js
vendored
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
/// 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.6-33",
|
||||||
|
|
||||||
|
path: "TestCases/chapter07/7.6/7.6-33.js",
|
||||||
|
|
||||||
|
description: "7.6 - SyntaxError expected: reserved words used as Identifier Names in UTF8: \u0073uper (super)",
|
||||||
|
|
||||||
|
test: function testcase() {
|
||||||
|
try {
|
||||||
|
eval("var \u0073uper = 123;");
|
||||||
|
return false;
|
||||||
|
} catch (e) {
|
||||||
|
return e instanceof SyntaxError;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
precondition: function prereq() {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
});
|
41
external/contributions/Microsoft/ietestcenter_build_2011/TestCases/chapter07/7.6/7.6-34.js
vendored
Normal file
41
external/contributions/Microsoft/ietestcenter_build_2011/TestCases/chapter07/7.6/7.6-34.js
vendored
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
/// 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.6-34",
|
||||||
|
|
||||||
|
path: "TestCases/chapter07/7.6/7.6-34.js",
|
||||||
|
|
||||||
|
description: "7.6 - SyntaxError expected: reserved words used as Identifier Names in UTF8: co\u006est (const)",
|
||||||
|
|
||||||
|
test: function testcase() {
|
||||||
|
try {
|
||||||
|
eval("var co\u006est = 123;");
|
||||||
|
return false;
|
||||||
|
} catch (e) {
|
||||||
|
return e instanceof SyntaxError;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
precondition: function prereq() {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
});
|
41
external/contributions/Microsoft/ietestcenter_build_2011/TestCases/chapter07/7.6/7.6-35.js
vendored
Normal file
41
external/contributions/Microsoft/ietestcenter_build_2011/TestCases/chapter07/7.6/7.6-35.js
vendored
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
/// 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.6-35",
|
||||||
|
|
||||||
|
path: "TestCases/chapter07/7.6/7.6-35.js",
|
||||||
|
|
||||||
|
description: "7.6 - SyntaxError expected: reserved words used as Identifier Names in UTF8: expor\u0074 (export)",
|
||||||
|
|
||||||
|
test: function testcase() {
|
||||||
|
try {
|
||||||
|
eval("var expor\u0074 = 123;");
|
||||||
|
return false;
|
||||||
|
} catch (e) {
|
||||||
|
return e instanceof SyntaxError;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
precondition: function prereq() {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
});
|
41
external/contributions/Microsoft/ietestcenter_build_2011/TestCases/chapter07/7.6/7.6-36.js
vendored
Normal file
41
external/contributions/Microsoft/ietestcenter_build_2011/TestCases/chapter07/7.6/7.6-36.js
vendored
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
/// 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.6-36",
|
||||||
|
|
||||||
|
path: "TestCases/chapter07/7.6/7.6-36.js",
|
||||||
|
|
||||||
|
description: "7.6 - SyntaxError expected: reserved words used as Identifier Names in UTF8: \u0069\u006d\u0070\u006f\u0072\u0074 (import)",
|
||||||
|
|
||||||
|
test: function testcase() {
|
||||||
|
try {
|
||||||
|
eval("var \u0069\u006d\u0070\u006f\u0072\u0074 = 123;");
|
||||||
|
return false;
|
||||||
|
} catch (e) {
|
||||||
|
return e instanceof SyntaxError;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
precondition: function prereq() {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
});
|
41
external/contributions/Microsoft/ietestcenter_build_2011/TestCases/chapter07/7.6/7.6-4.js
vendored
Normal file
41
external/contributions/Microsoft/ietestcenter_build_2011/TestCases/chapter07/7.6/7.6-4.js
vendored
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
/// 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.6-4",
|
||||||
|
|
||||||
|
path: "TestCases/chapter07/7.6/7.6-4.js",
|
||||||
|
|
||||||
|
description: "7.6 - SyntaxError expected: reserved words used as Identifier Names in UTF8: \u0062\u0072\u0065\u0061\u006b (break)",
|
||||||
|
|
||||||
|
test: function testcase() {
|
||||||
|
try {
|
||||||
|
eval("var \u0062\u0072\u0065\u0061\u006b = 123;");
|
||||||
|
return false;
|
||||||
|
} catch (e) {
|
||||||
|
return e instanceof SyntaxError;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
precondition: function prereq() {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
});
|
41
external/contributions/Microsoft/ietestcenter_build_2011/TestCases/chapter07/7.6/7.6-5.js
vendored
Normal file
41
external/contributions/Microsoft/ietestcenter_build_2011/TestCases/chapter07/7.6/7.6-5.js
vendored
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
/// 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.6-5",
|
||||||
|
|
||||||
|
path: "TestCases/chapter07/7.6/7.6-5.js",
|
||||||
|
|
||||||
|
description: "7.6 - SyntaxError expected: reserved words used as Identifier Names in UTF8: \u0063ase (case)",
|
||||||
|
|
||||||
|
test: function testcase() {
|
||||||
|
try {
|
||||||
|
eval("var \u0063ase = 123;");
|
||||||
|
return false;
|
||||||
|
} catch (e) {
|
||||||
|
return e instanceof SyntaxError;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
precondition: function prereq() {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
});
|
41
external/contributions/Microsoft/ietestcenter_build_2011/TestCases/chapter07/7.6/7.6-6.js
vendored
Normal file
41
external/contributions/Microsoft/ietestcenter_build_2011/TestCases/chapter07/7.6/7.6-6.js
vendored
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
/// 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.6-6",
|
||||||
|
|
||||||
|
path: "TestCases/chapter07/7.6/7.6-6.js",
|
||||||
|
|
||||||
|
description: "7.6 - SyntaxError expected: reserved words used as Identifier Names in UTF8: insta\u006eceof (instanceof)",
|
||||||
|
|
||||||
|
test: function testcase() {
|
||||||
|
try {
|
||||||
|
eval("var insta\u006eceof = 123;");
|
||||||
|
return false;
|
||||||
|
} catch (e) {
|
||||||
|
return e instanceof SyntaxError;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
precondition: function prereq() {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
});
|
41
external/contributions/Microsoft/ietestcenter_build_2011/TestCases/chapter07/7.6/7.6-7.js
vendored
Normal file
41
external/contributions/Microsoft/ietestcenter_build_2011/TestCases/chapter07/7.6/7.6-7.js
vendored
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
/// 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.6-7",
|
||||||
|
|
||||||
|
path: "TestCases/chapter07/7.6/7.6-7.js",
|
||||||
|
|
||||||
|
description: "7.6 - SyntaxError expected: reserved words used as Identifier Names in UTF8: typeo\u0066 (typeof)",
|
||||||
|
|
||||||
|
test: function testcase() {
|
||||||
|
try {
|
||||||
|
eval("var typeo\u0066 = 123;");
|
||||||
|
return false;
|
||||||
|
} catch (e) {
|
||||||
|
return e instanceof SyntaxError;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
precondition: function prereq() {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
});
|
41
external/contributions/Microsoft/ietestcenter_build_2011/TestCases/chapter07/7.6/7.6-8.js
vendored
Normal file
41
external/contributions/Microsoft/ietestcenter_build_2011/TestCases/chapter07/7.6/7.6-8.js
vendored
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
/// 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.6-8",
|
||||||
|
|
||||||
|
path: "TestCases/chapter07/7.6/7.6-8.js",
|
||||||
|
|
||||||
|
description: "7.6 - SyntaxError expected: reserved words used as Identifier Names in UTF8: \u0064\u006f (do)",
|
||||||
|
|
||||||
|
test: function testcase() {
|
||||||
|
try {
|
||||||
|
eval("var \u0064\u006f = 123;");
|
||||||
|
return false;
|
||||||
|
} catch (e) {
|
||||||
|
return e instanceof SyntaxError;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
precondition: function prereq() {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
});
|
41
external/contributions/Microsoft/ietestcenter_build_2011/TestCases/chapter07/7.6/7.6-9.js
vendored
Normal file
41
external/contributions/Microsoft/ietestcenter_build_2011/TestCases/chapter07/7.6/7.6-9.js
vendored
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
/// 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.6-9",
|
||||||
|
|
||||||
|
path: "TestCases/chapter07/7.6/7.6-9.js",
|
||||||
|
|
||||||
|
description: "7.6 - SyntaxError expected: reserved words used as Identifier Names in UTF8: \u0065lse (else) (null)",
|
||||||
|
|
||||||
|
test: function testcase() {
|
||||||
|
try {
|
||||||
|
eval("var \u0065lse = 123;");
|
||||||
|
return false;
|
||||||
|
} catch (e) {
|
||||||
|
return e instanceof SyntaxError;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
precondition: function prereq() {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
});
|
@ -0,0 +1,54 @@
|
|||||||
|
/// 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.6.1-1-1",
|
||||||
|
|
||||||
|
path: "TestCases/chapter07/7.6/7.6.1/7.6.1-1-1.js",
|
||||||
|
|
||||||
|
description: "Allow reserved words as property names at object initialization, verified with hasOwnProperty: null, true, false",
|
||||||
|
|
||||||
|
test: function testcase(){
|
||||||
|
var tokenCodes = {
|
||||||
|
null: 0,
|
||||||
|
true: 1,
|
||||||
|
false: 2
|
||||||
|
};
|
||||||
|
var arr = [
|
||||||
|
'null',
|
||||||
|
'true',
|
||||||
|
'false'
|
||||||
|
];
|
||||||
|
for(var p in tokenCodes) {
|
||||||
|
for(var p1 in arr) {
|
||||||
|
if(arr[p1] === p) {
|
||||||
|
if(!tokenCodes.hasOwnProperty(arr[p1])) {
|
||||||
|
return false;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
},
|
||||||
|
|
||||||
|
precondition: function prereq() { return true;
|
||||||
|
}
|
||||||
|
});
|
@ -0,0 +1,54 @@
|
|||||||
|
/// 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.6.1-1-10",
|
||||||
|
|
||||||
|
path: "TestCases/chapter07/7.6/7.6.1/7.6.1-1-10.js",
|
||||||
|
|
||||||
|
description: "Allow reserved words as property names at object initialization, verified with hasOwnProperty: in, try, class",
|
||||||
|
|
||||||
|
test: function testcase(){
|
||||||
|
var tokenCodes = {
|
||||||
|
in: 0,
|
||||||
|
try: 1,
|
||||||
|
class: 2
|
||||||
|
};
|
||||||
|
var arr = [
|
||||||
|
'in',
|
||||||
|
'try',
|
||||||
|
'class'
|
||||||
|
];
|
||||||
|
for(var p in tokenCodes) {
|
||||||
|
for(var p1 in arr) {
|
||||||
|
if(arr[p1] === p) {
|
||||||
|
if(!tokenCodes.hasOwnProperty(arr[p1])) {
|
||||||
|
return false;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
},
|
||||||
|
|
||||||
|
precondition: function prereq() { return true;
|
||||||
|
}
|
||||||
|
});
|
@ -0,0 +1,54 @@
|
|||||||
|
/// 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.6.1-1-11",
|
||||||
|
|
||||||
|
path: "TestCases/chapter07/7.6/7.6.1/7.6.1-1-11.js",
|
||||||
|
|
||||||
|
description: "Allow reserved words as property names at object initialization, verified with hasOwnProperty: enum, extends, super",
|
||||||
|
|
||||||
|
test: function testcase(){
|
||||||
|
var tokenCodes = {
|
||||||
|
enum: 0,
|
||||||
|
extends: 1,
|
||||||
|
super: 2
|
||||||
|
};
|
||||||
|
var arr = [
|
||||||
|
'enum',
|
||||||
|
'extends',
|
||||||
|
'super'
|
||||||
|
];
|
||||||
|
for(var p in tokenCodes) {
|
||||||
|
for(var p1 in arr) {
|
||||||
|
if(arr[p1] === p) {
|
||||||
|
if(!tokenCodes.hasOwnProperty(arr[p1])) {
|
||||||
|
return false;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
},
|
||||||
|
|
||||||
|
precondition: function prereq() { return true;
|
||||||
|
}
|
||||||
|
});
|
@ -0,0 +1,54 @@
|
|||||||
|
/// 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.6.1-1-12",
|
||||||
|
|
||||||
|
path: "TestCases/chapter07/7.6/7.6.1/7.6.1-1-12.js",
|
||||||
|
|
||||||
|
description: "Allow reserved words as property names at object initialization, verified with hasOwnProperty: const, export, import",
|
||||||
|
|
||||||
|
test: function testcase(){
|
||||||
|
var tokenCodes = {
|
||||||
|
const: 0,
|
||||||
|
export: 1,
|
||||||
|
import: 2
|
||||||
|
};
|
||||||
|
var arr = [
|
||||||
|
'const',
|
||||||
|
'export',
|
||||||
|
'import'
|
||||||
|
];
|
||||||
|
for(var p in tokenCodes) {
|
||||||
|
for(var p1 in arr) {
|
||||||
|
if(arr[p1] === p) {
|
||||||
|
if(!tokenCodes.hasOwnProperty(arr[p1])) {
|
||||||
|
return false;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
},
|
||||||
|
|
||||||
|
precondition: function prereq() { return true;
|
||||||
|
}
|
||||||
|
});
|
@ -0,0 +1,54 @@
|
|||||||
|
/// 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.6.1-1-13",
|
||||||
|
|
||||||
|
path: "TestCases/chapter07/7.6/7.6.1/7.6.1-1-13.js",
|
||||||
|
|
||||||
|
description: "Allow reserved words as property names at object initialization, verified with hasOwnProperty: implements, let, private",
|
||||||
|
|
||||||
|
test: function testcase(){
|
||||||
|
var tokenCodes = {
|
||||||
|
implements: 0,
|
||||||
|
let: 1,
|
||||||
|
private: 2
|
||||||
|
};
|
||||||
|
var arr = [
|
||||||
|
'implements',
|
||||||
|
'let',
|
||||||
|
'private'
|
||||||
|
];
|
||||||
|
for(var p in tokenCodes) {
|
||||||
|
for(var p1 in arr) {
|
||||||
|
if(arr[p1] === p) {
|
||||||
|
if(!tokenCodes.hasOwnProperty(arr[p1])) {
|
||||||
|
return false;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
},
|
||||||
|
|
||||||
|
precondition: function prereq() { return true;
|
||||||
|
}
|
||||||
|
});
|
@ -0,0 +1,54 @@
|
|||||||
|
/// 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.6.1-1-14",
|
||||||
|
|
||||||
|
path: "TestCases/chapter07/7.6/7.6.1/7.6.1-1-14.js",
|
||||||
|
|
||||||
|
description: "Allow reserved words as property names at object initialization, verified with hasOwnProperty: public, yield, interface",
|
||||||
|
|
||||||
|
test: function testcase(){
|
||||||
|
var tokenCodes = {
|
||||||
|
public: 0,
|
||||||
|
yield: 1,
|
||||||
|
interface: 2
|
||||||
|
};
|
||||||
|
var arr = [
|
||||||
|
'public',
|
||||||
|
'yield',
|
||||||
|
'interface'
|
||||||
|
];
|
||||||
|
for(var p in tokenCodes) {
|
||||||
|
for(var p1 in arr) {
|
||||||
|
if(arr[p1] === p) {
|
||||||
|
if(!tokenCodes.hasOwnProperty(arr[p1])) {
|
||||||
|
return false;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
},
|
||||||
|
|
||||||
|
precondition: function prereq() { return true;
|
||||||
|
}
|
||||||
|
});
|
@ -0,0 +1,54 @@
|
|||||||
|
/// 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.6.1-1-15",
|
||||||
|
|
||||||
|
path: "TestCases/chapter07/7.6/7.6.1/7.6.1-1-15.js",
|
||||||
|
|
||||||
|
description: "Allow reserved words as property names at object initialization, verified with hasOwnProperty: package, protected, static",
|
||||||
|
|
||||||
|
test: function testcase(){
|
||||||
|
var tokenCodes = {
|
||||||
|
package: 0,
|
||||||
|
protected: 1,
|
||||||
|
static: 2
|
||||||
|
};
|
||||||
|
var arr = [
|
||||||
|
'package',
|
||||||
|
'protected',
|
||||||
|
'static'
|
||||||
|
];
|
||||||
|
for(var p in tokenCodes) {
|
||||||
|
for(var p1 in arr) {
|
||||||
|
if(arr[p1] === p) {
|
||||||
|
if(!tokenCodes.hasOwnProperty(arr[p1])) {
|
||||||
|
return false;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
},
|
||||||
|
|
||||||
|
precondition: function prereq() { return true;
|
||||||
|
}
|
||||||
|
});
|
@ -0,0 +1,54 @@
|
|||||||
|
/// 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.6.1-1-16",
|
||||||
|
|
||||||
|
path: "TestCases/chapter07/7.6/7.6.1/7.6.1-1-16.js",
|
||||||
|
|
||||||
|
description: "Allow reserved words as property names at object initialization, verified with hasOwnProperty: undeefined, NaN, Infinity",
|
||||||
|
|
||||||
|
test: function testcase(){
|
||||||
|
var tokenCodes = {
|
||||||
|
undefined: 0,
|
||||||
|
NaN: 1,
|
||||||
|
Infinity: 2
|
||||||
|
};
|
||||||
|
var arr = [
|
||||||
|
'undefined',
|
||||||
|
'NaN',
|
||||||
|
'Infinity'
|
||||||
|
];
|
||||||
|
for(var p in tokenCodes) {
|
||||||
|
for(var p1 in arr) {
|
||||||
|
if(arr[p1] === p) {
|
||||||
|
if(!tokenCodes.hasOwnProperty(arr[p1])) {
|
||||||
|
return false;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
},
|
||||||
|
|
||||||
|
precondition: function prereq() { return true;
|
||||||
|
}
|
||||||
|
});
|
@ -0,0 +1,54 @@
|
|||||||
|
/// 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.6.1-1-2",
|
||||||
|
|
||||||
|
path: "TestCases/chapter07/7.6/7.6.1/7.6.1-1-2.js",
|
||||||
|
|
||||||
|
description: "Allow reserved words as property names at object initialization, verified with hasOwnProperty: break, case, do",
|
||||||
|
|
||||||
|
test: function testcase(){
|
||||||
|
var tokenCodes = {
|
||||||
|
break: 0,
|
||||||
|
case: 1,
|
||||||
|
do: 2
|
||||||
|
};
|
||||||
|
var arr = [
|
||||||
|
'break',
|
||||||
|
'case',
|
||||||
|
'do'
|
||||||
|
];
|
||||||
|
for(var p in tokenCodes) {
|
||||||
|
for(var p1 in arr) {
|
||||||
|
if(arr[p1] === p) {
|
||||||
|
if(!tokenCodes.hasOwnProperty(arr[p1])) {
|
||||||
|
return false;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
},
|
||||||
|
|
||||||
|
precondition: function prereq() { return true;
|
||||||
|
}
|
||||||
|
});
|
@ -0,0 +1,54 @@
|
|||||||
|
/// 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.6.1-1-3",
|
||||||
|
|
||||||
|
path: "TestCases/chapter07/7.6/7.6.1/7.6.1-1-3.js",
|
||||||
|
|
||||||
|
description: "Allow reserved words as property names at object initialization, verified with hasOwnProperty: instanceof, typeof, else",
|
||||||
|
|
||||||
|
test: function testcase(){
|
||||||
|
var tokenCodes = {
|
||||||
|
instanceof: 0,
|
||||||
|
typeof: 1,
|
||||||
|
else: 2
|
||||||
|
};
|
||||||
|
var arr = [
|
||||||
|
'instanceof',
|
||||||
|
'typeof',
|
||||||
|
'else'
|
||||||
|
];
|
||||||
|
for(var p in tokenCodes) {
|
||||||
|
for(var p1 in arr) {
|
||||||
|
if(arr[p1] === p) {
|
||||||
|
if(!tokenCodes.hasOwnProperty(arr[p1])) {
|
||||||
|
return false;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
},
|
||||||
|
|
||||||
|
precondition: function prereq() { return true;
|
||||||
|
}
|
||||||
|
});
|
@ -0,0 +1,54 @@
|
|||||||
|
/// 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.6.1-1-4",
|
||||||
|
|
||||||
|
path: "TestCases/chapter07/7.6/7.6.1/7.6.1-1-4.js",
|
||||||
|
|
||||||
|
description: "Allow reserved words as property names at object initialization, verified with hasOwnProperty: new, var, catch",
|
||||||
|
|
||||||
|
test: function testcase(){
|
||||||
|
var tokenCodes = {
|
||||||
|
new: 0,
|
||||||
|
var: 1,
|
||||||
|
catch: 2
|
||||||
|
};
|
||||||
|
var arr = [
|
||||||
|
'new',
|
||||||
|
'var',
|
||||||
|
'catch'
|
||||||
|
];
|
||||||
|
for(var p in tokenCodes) {
|
||||||
|
for(var p1 in arr) {
|
||||||
|
if(arr[p1] === p) {
|
||||||
|
if(!tokenCodes.hasOwnProperty(arr[p1])) {
|
||||||
|
return false;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
},
|
||||||
|
|
||||||
|
precondition: function prereq() { return true;
|
||||||
|
}
|
||||||
|
});
|
@ -0,0 +1,54 @@
|
|||||||
|
/// 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.6.1-1-5",
|
||||||
|
|
||||||
|
path: "TestCases/chapter07/7.6/7.6.1/7.6.1-1-5.js",
|
||||||
|
|
||||||
|
description: "Allow reserved words as property names at object initialization, verified with hasOwnProperty: finally, return, void",
|
||||||
|
|
||||||
|
test: function testcase(){
|
||||||
|
var tokenCodes = {
|
||||||
|
finally: 0,
|
||||||
|
return: 1,
|
||||||
|
void: 2
|
||||||
|
};
|
||||||
|
var arr = [
|
||||||
|
'finally',
|
||||||
|
'return',
|
||||||
|
'void'
|
||||||
|
];
|
||||||
|
for(var p in tokenCodes) {
|
||||||
|
for(var p1 in arr) {
|
||||||
|
if(arr[p1] === p) {
|
||||||
|
if(!tokenCodes.hasOwnProperty(arr[p1])) {
|
||||||
|
return false;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
},
|
||||||
|
|
||||||
|
precondition: function prereq() { return true;
|
||||||
|
}
|
||||||
|
});
|
@ -0,0 +1,54 @@
|
|||||||
|
/// 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.6.1-1-6",
|
||||||
|
|
||||||
|
path: "TestCases/chapter07/7.6/7.6.1/7.6.1-1-6.js",
|
||||||
|
|
||||||
|
description: "Allow reserved words as property names at object initialization, verified with hasOwnProperty: continue, for, switch",
|
||||||
|
|
||||||
|
test: function testcase(){
|
||||||
|
var tokenCodes = {
|
||||||
|
continue: 0,
|
||||||
|
for: 1,
|
||||||
|
switch: 2
|
||||||
|
};
|
||||||
|
var arr = [
|
||||||
|
'continue',
|
||||||
|
'for',
|
||||||
|
'switch'
|
||||||
|
];
|
||||||
|
for(var p in tokenCodes) {
|
||||||
|
for(var p1 in arr) {
|
||||||
|
if(arr[p1] === p) {
|
||||||
|
if(!tokenCodes.hasOwnProperty(arr[p1])) {
|
||||||
|
return false;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
},
|
||||||
|
|
||||||
|
precondition: function prereq() { return true;
|
||||||
|
}
|
||||||
|
});
|
@ -0,0 +1,54 @@
|
|||||||
|
/// 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.6.1-1-7",
|
||||||
|
|
||||||
|
path: "TestCases/chapter07/7.6/7.6.1/7.6.1-1-7.js",
|
||||||
|
|
||||||
|
description: "Allow reserved words as property names at object initialization, verified with hasOwnProperty: while, debugger, function",
|
||||||
|
|
||||||
|
test: function testcase(){
|
||||||
|
var tokenCodes = {
|
||||||
|
while: 0,
|
||||||
|
debugger: 1,
|
||||||
|
function: 2
|
||||||
|
};
|
||||||
|
var arr = [
|
||||||
|
'while' ,
|
||||||
|
'debugger',
|
||||||
|
'function'
|
||||||
|
];
|
||||||
|
for(var p in tokenCodes) {
|
||||||
|
for(var p1 in arr) {
|
||||||
|
if(arr[p1] === p) {
|
||||||
|
if(!tokenCodes.hasOwnProperty(arr[p1])) {
|
||||||
|
return false;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
},
|
||||||
|
|
||||||
|
precondition: function prereq() { return true;
|
||||||
|
}
|
||||||
|
});
|
@ -0,0 +1,54 @@
|
|||||||
|
/// 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.6.1-1-8",
|
||||||
|
|
||||||
|
path: "TestCases/chapter07/7.6/7.6.1/7.6.1-1-8.js",
|
||||||
|
|
||||||
|
description: "Allow reserved words as property names at object initialization, verified with hasOwnProperty: this, with, default",
|
||||||
|
|
||||||
|
test: function testcase(){
|
||||||
|
var tokenCodes = {
|
||||||
|
this: 0,
|
||||||
|
with: 1,
|
||||||
|
default: 2
|
||||||
|
};
|
||||||
|
var arr = [
|
||||||
|
'this',
|
||||||
|
'with',
|
||||||
|
'default'
|
||||||
|
];
|
||||||
|
for(var p in tokenCodes) {
|
||||||
|
for(var p1 in arr) {
|
||||||
|
if(arr[p1] === p) {
|
||||||
|
if(!tokenCodes.hasOwnProperty(arr[p1])) {
|
||||||
|
return false;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
},
|
||||||
|
|
||||||
|
precondition: function prereq() { return true;
|
||||||
|
}
|
||||||
|
});
|
@ -0,0 +1,54 @@
|
|||||||
|
/// 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.6.1-1-9",
|
||||||
|
|
||||||
|
path: "TestCases/chapter07/7.6/7.6.1/7.6.1-1-9.js",
|
||||||
|
|
||||||
|
description: "Allow reserved words as property names at object initialization, verified with hasOwnProperty: if, throw, delete",
|
||||||
|
|
||||||
|
test: function testcase(){
|
||||||
|
var tokenCodes = {
|
||||||
|
if: 0,
|
||||||
|
throw: 1,
|
||||||
|
delete: 2
|
||||||
|
};
|
||||||
|
var arr = [
|
||||||
|
'if',
|
||||||
|
'throw',
|
||||||
|
'delete'
|
||||||
|
];
|
||||||
|
for(var p in tokenCodes) {
|
||||||
|
for(var p1 in arr) {
|
||||||
|
if(arr[p1] === p) {
|
||||||
|
if(!tokenCodes.hasOwnProperty(arr[p1])) {
|
||||||
|
return false;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
},
|
||||||
|
|
||||||
|
precondition: function prereq() { return true;
|
||||||
|
}
|
||||||
|
});
|
@ -0,0 +1,53 @@
|
|||||||
|
/// 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.6.1-2-1",
|
||||||
|
|
||||||
|
path: "TestCases/chapter07/7.6/7.6.1/7.6.1-2-1.js",
|
||||||
|
|
||||||
|
description: "Allow reserved words as property names by dot operator assignment, verified with hasOwnProperty: null, true, false",
|
||||||
|
|
||||||
|
test: function testcase() {
|
||||||
|
var tokenCodes = {};
|
||||||
|
tokenCodes.null = 0;
|
||||||
|
tokenCodes.true = 1;
|
||||||
|
tokenCodes.false = 2;
|
||||||
|
var arr = [
|
||||||
|
'null',
|
||||||
|
'true',
|
||||||
|
'false'
|
||||||
|
];
|
||||||
|
for(var p in tokenCodes) {
|
||||||
|
for(var p1 in arr) {
|
||||||
|
if(arr[p1] === p) {
|
||||||
|
if(!tokenCodes.hasOwnProperty(arr[p1])) {
|
||||||
|
return false;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
},
|
||||||
|
|
||||||
|
precondition: function prereq() { return true;
|
||||||
|
}
|
||||||
|
});
|
@ -0,0 +1,53 @@
|
|||||||
|
/// 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.6.1-2-10",
|
||||||
|
|
||||||
|
path: "TestCases/chapter07/7.6/7.6.1/7.6.1-2-10.js",
|
||||||
|
|
||||||
|
description: "Allow reserved words as property names by dot operator assignment, verified with hasOwnProperty: in, try, class",
|
||||||
|
|
||||||
|
test: function testcase() {
|
||||||
|
var tokenCodes = {};
|
||||||
|
tokenCodes.in = 0;
|
||||||
|
tokenCodes.try = 1;
|
||||||
|
tokenCodes.class = 2;
|
||||||
|
var arr = [
|
||||||
|
'in',
|
||||||
|
'try',
|
||||||
|
'class'
|
||||||
|
];
|
||||||
|
for(var p in tokenCodes) {
|
||||||
|
for(var p1 in arr) {
|
||||||
|
if(arr[p1] === p) {
|
||||||
|
if(!tokenCodes.hasOwnProperty(arr[p1])) {
|
||||||
|
return false;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
},
|
||||||
|
|
||||||
|
precondition: function prereq() { return true;
|
||||||
|
}
|
||||||
|
});
|
@ -0,0 +1,53 @@
|
|||||||
|
/// 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.6.1-2-11",
|
||||||
|
|
||||||
|
path: "TestCases/chapter07/7.6/7.6.1/7.6.1-2-11.js",
|
||||||
|
|
||||||
|
description: "Allow reserved words as property names by dot operator assignment, verified with hasOwnProperty: enum, extends, super",
|
||||||
|
|
||||||
|
test: function testcase() {
|
||||||
|
var tokenCodes = {};
|
||||||
|
tokenCodes.enum = 0;
|
||||||
|
tokenCodes.extends = 1;
|
||||||
|
tokenCodes.super = 2;
|
||||||
|
var arr = [
|
||||||
|
'enum',
|
||||||
|
'extends',
|
||||||
|
'super'
|
||||||
|
];
|
||||||
|
for(var p in tokenCodes) {
|
||||||
|
for(var p1 in arr) {
|
||||||
|
if(arr[p1] === p) {
|
||||||
|
if(!tokenCodes.hasOwnProperty(arr[p1])) {
|
||||||
|
return false;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
},
|
||||||
|
|
||||||
|
precondition: function prereq() { return true;
|
||||||
|
}
|
||||||
|
});
|
@ -0,0 +1,53 @@
|
|||||||
|
/// 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.6.1-2-12",
|
||||||
|
|
||||||
|
path: "TestCases/chapter07/7.6/7.6.1/7.6.1-2-12.js",
|
||||||
|
|
||||||
|
description: "Allow reserved words as property names by dot operator assignment, verified with hasOwnProperty: const, export, import",
|
||||||
|
|
||||||
|
test: function testcase() {
|
||||||
|
var tokenCodes = {};
|
||||||
|
tokenCodes.const = 0;
|
||||||
|
tokenCodes.export = 1;
|
||||||
|
tokenCodes.import = 2;
|
||||||
|
var arr = [
|
||||||
|
'const',
|
||||||
|
'export',
|
||||||
|
'import'
|
||||||
|
];
|
||||||
|
for(var p in tokenCodes) {
|
||||||
|
for(var p1 in arr) {
|
||||||
|
if(arr[p1] === p) {
|
||||||
|
if(!tokenCodes.hasOwnProperty(arr[p1])) {
|
||||||
|
return false;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
},
|
||||||
|
|
||||||
|
precondition: function prereq() { return true;
|
||||||
|
}
|
||||||
|
});
|
@ -0,0 +1,53 @@
|
|||||||
|
/// 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.6.1-2-13",
|
||||||
|
|
||||||
|
path: "TestCases/chapter07/7.6/7.6.1/7.6.1-2-13.js",
|
||||||
|
|
||||||
|
description: "Allow reserved words as property names by dot operator assignment, verified with hasOwnProperty: implements, let, private",
|
||||||
|
|
||||||
|
test: function testcase() {
|
||||||
|
var tokenCodes = {};
|
||||||
|
tokenCodes.implements = 0;
|
||||||
|
tokenCodes.let = 1;
|
||||||
|
tokenCodes.private = 2;
|
||||||
|
var arr = [
|
||||||
|
'implements',
|
||||||
|
'let',
|
||||||
|
'private'
|
||||||
|
];
|
||||||
|
for(var p in tokenCodes) {
|
||||||
|
for(var p1 in arr) {
|
||||||
|
if(arr[p1] === p) {
|
||||||
|
if(!tokenCodes.hasOwnProperty(arr[p1])) {
|
||||||
|
return false;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
},
|
||||||
|
|
||||||
|
precondition: function prereq() { return true;
|
||||||
|
}
|
||||||
|
});
|
@ -0,0 +1,53 @@
|
|||||||
|
/// 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.6.1-2-14",
|
||||||
|
|
||||||
|
path: "TestCases/chapter07/7.6/7.6.1/7.6.1-2-14.js",
|
||||||
|
|
||||||
|
description: "Allow reserved words as property names by dot operator assignment, verified with hasOwnProperty: public, yield, interface",
|
||||||
|
|
||||||
|
test: function testcase() {
|
||||||
|
var tokenCodes = {};
|
||||||
|
tokenCodes.public = 0;
|
||||||
|
tokenCodes.yield = 1;
|
||||||
|
tokenCodes.interface = 2;
|
||||||
|
var arr = [
|
||||||
|
'public',
|
||||||
|
'yield',
|
||||||
|
'interface'
|
||||||
|
];
|
||||||
|
for(var p in tokenCodes) {
|
||||||
|
for(var p1 in arr) {
|
||||||
|
if(arr[p1] === p) {
|
||||||
|
if(!tokenCodes.hasOwnProperty(arr[p1])) {
|
||||||
|
return false;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
},
|
||||||
|
|
||||||
|
precondition: function prereq() { return true;
|
||||||
|
}
|
||||||
|
});
|
@ -0,0 +1,53 @@
|
|||||||
|
/// 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.6.1-2-15",
|
||||||
|
|
||||||
|
path: "TestCases/chapter07/7.6/7.6.1/7.6.1-2-15.js",
|
||||||
|
|
||||||
|
description: "Allow reserved words as property names by dot operator assignment, verified with hasOwnProperty: package, protected, static",
|
||||||
|
|
||||||
|
test: function testcase() {
|
||||||
|
var tokenCodes = {};
|
||||||
|
tokenCodes.package = 0;
|
||||||
|
tokenCodes.protected = 1;
|
||||||
|
tokenCodes.static = 2;
|
||||||
|
var arr = [
|
||||||
|
'package',
|
||||||
|
'protected',
|
||||||
|
'static'
|
||||||
|
];
|
||||||
|
for(var p in tokenCodes) {
|
||||||
|
for(var p1 in arr) {
|
||||||
|
if(arr[p1] === p) {
|
||||||
|
if(!tokenCodes.hasOwnProperty(arr[p1])) {
|
||||||
|
return false;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
},
|
||||||
|
|
||||||
|
precondition: function prereq() { return true;
|
||||||
|
}
|
||||||
|
});
|
@ -0,0 +1,53 @@
|
|||||||
|
/// 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.6.1-2-16",
|
||||||
|
|
||||||
|
path: "TestCases/chapter07/7.6/7.6.1/7.6.1-2-16.js",
|
||||||
|
|
||||||
|
description: "Allow reserved words as property names by dot operator assignment, verified with hasOwnProperty: undefined, NaN, Infinity",
|
||||||
|
|
||||||
|
test: function testcase() {
|
||||||
|
var tokenCodes = {};
|
||||||
|
tokenCodes.undefined = 0;
|
||||||
|
tokenCodes.NaN = 1;
|
||||||
|
tokenCodes.Infinity = 2;
|
||||||
|
var arr = [
|
||||||
|
'undefined',
|
||||||
|
'NaN',
|
||||||
|
'Infinity'
|
||||||
|
];
|
||||||
|
for(var p in tokenCodes) {
|
||||||
|
for(var p1 in arr) {
|
||||||
|
if(arr[p1] === p) {
|
||||||
|
if(!tokenCodes.hasOwnProperty(arr[p1])) {
|
||||||
|
return false;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
},
|
||||||
|
|
||||||
|
precondition: function prereq() { return true;
|
||||||
|
}
|
||||||
|
});
|
@ -0,0 +1,53 @@
|
|||||||
|
/// 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.6.1-2-2",
|
||||||
|
|
||||||
|
path: "TestCases/chapter07/7.6/7.6.1/7.6.1-2-2.js",
|
||||||
|
|
||||||
|
description: "Allow reserved words as property names by dot operator assignment, verified with hasOwnProperty: break, case, do",
|
||||||
|
|
||||||
|
test: function testcase() {
|
||||||
|
var tokenCodes = {};
|
||||||
|
tokenCodes.break = 0;
|
||||||
|
tokenCodes.case = 1;
|
||||||
|
tokenCodes.do = 2;
|
||||||
|
var arr = [
|
||||||
|
'break',
|
||||||
|
'case',
|
||||||
|
'do'
|
||||||
|
];
|
||||||
|
for(var p in tokenCodes) {
|
||||||
|
for(var p1 in arr) {
|
||||||
|
if(arr[p1] === p) {
|
||||||
|
if(!tokenCodes.hasOwnProperty(arr[p1])) {
|
||||||
|
return false;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
},
|
||||||
|
|
||||||
|
precondition: function prereq() { return true;
|
||||||
|
}
|
||||||
|
});
|
@ -0,0 +1,53 @@
|
|||||||
|
/// 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.6.1-2-3",
|
||||||
|
|
||||||
|
path: "TestCases/chapter07/7.6/7.6.1/7.6.1-2-3.js",
|
||||||
|
|
||||||
|
description: "Allow reserved words as property names by dot operator assignment, verified with hasOwnProperty: instanceof, typeof, else",
|
||||||
|
|
||||||
|
test: function testcase() {
|
||||||
|
var tokenCodes = {};
|
||||||
|
tokenCodes.instanceof = 0;
|
||||||
|
tokenCodes.typeof = 1;
|
||||||
|
tokenCodes.else = 2;
|
||||||
|
var arr = [
|
||||||
|
'instanceof',
|
||||||
|
'typeof',
|
||||||
|
'else'
|
||||||
|
];
|
||||||
|
for(var p in tokenCodes) {
|
||||||
|
for(var p1 in arr) {
|
||||||
|
if(arr[p1] === p) {
|
||||||
|
if(!tokenCodes.hasOwnProperty(arr[p1])) {
|
||||||
|
return false;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
},
|
||||||
|
|
||||||
|
precondition: function prereq() { return true;
|
||||||
|
}
|
||||||
|
});
|
@ -0,0 +1,53 @@
|
|||||||
|
/// 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.6.1-2-4",
|
||||||
|
|
||||||
|
path: "TestCases/chapter07/7.6/7.6.1/7.6.1-2-4.js",
|
||||||
|
|
||||||
|
description: "Allow reserved words as property names by dot operator assignment, verified with hasOwnProperty: new, var, catch",
|
||||||
|
|
||||||
|
test: function testcase() {
|
||||||
|
var tokenCodes = {};
|
||||||
|
tokenCodes.new = 0;
|
||||||
|
tokenCodes.var = 1;
|
||||||
|
tokenCodes.catch = 2;
|
||||||
|
var arr = [
|
||||||
|
'new',
|
||||||
|
'var',
|
||||||
|
'catch'
|
||||||
|
];
|
||||||
|
for(var p in tokenCodes) {
|
||||||
|
for(var p1 in arr) {
|
||||||
|
if(arr[p1] === p) {
|
||||||
|
if(!tokenCodes.hasOwnProperty(arr[p1])) {
|
||||||
|
return false;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
},
|
||||||
|
|
||||||
|
precondition: function prereq() { return true;
|
||||||
|
}
|
||||||
|
});
|
@ -0,0 +1,53 @@
|
|||||||
|
/// 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.6.1-2-5",
|
||||||
|
|
||||||
|
path: "TestCases/chapter07/7.6/7.6.1/7.6.1-2-5.js",
|
||||||
|
|
||||||
|
description: "Allow reserved words as property names by dot operator assignment, verified with hasOwnProperty: finally, return, void",
|
||||||
|
|
||||||
|
test: function testcase() {
|
||||||
|
var tokenCodes = {};
|
||||||
|
tokenCodes.finally = 0;
|
||||||
|
tokenCodes.return = 1;
|
||||||
|
tokenCodes.void = 2;
|
||||||
|
var arr = [
|
||||||
|
'finally',
|
||||||
|
'return',
|
||||||
|
'void'
|
||||||
|
];
|
||||||
|
for(var p in tokenCodes) {
|
||||||
|
for(var p1 in arr) {
|
||||||
|
if(arr[p1] === p) {
|
||||||
|
if(!tokenCodes.hasOwnProperty(arr[p1])) {
|
||||||
|
return false;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
},
|
||||||
|
|
||||||
|
precondition: function prereq() { return true;
|
||||||
|
}
|
||||||
|
});
|
@ -0,0 +1,53 @@
|
|||||||
|
/// 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.6.1-2-6",
|
||||||
|
|
||||||
|
path: "TestCases/chapter07/7.6/7.6.1/7.6.1-2-6.js",
|
||||||
|
|
||||||
|
description: "Allow reserved words as property names by dot operator assignment, verified with hasOwnProperty: continue, for, switch",
|
||||||
|
|
||||||
|
test: function testcase() {
|
||||||
|
var tokenCodes = {};
|
||||||
|
tokenCodes.continue = 0;
|
||||||
|
tokenCodes.for = 1;
|
||||||
|
tokenCodes.switch = 2;
|
||||||
|
var arr = [
|
||||||
|
'continue',
|
||||||
|
'for',
|
||||||
|
'switch'
|
||||||
|
];
|
||||||
|
for(var p in tokenCodes) {
|
||||||
|
for(var p1 in arr) {
|
||||||
|
if(arr[p1] === p) {
|
||||||
|
if(!tokenCodes.hasOwnProperty(arr[p1])) {
|
||||||
|
return false;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
},
|
||||||
|
|
||||||
|
precondition: function prereq() { return true;
|
||||||
|
}
|
||||||
|
});
|
@ -0,0 +1,53 @@
|
|||||||
|
/// 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.6.1-2-7",
|
||||||
|
|
||||||
|
path: "TestCases/chapter07/7.6/7.6.1/7.6.1-2-7.js",
|
||||||
|
|
||||||
|
description: "Allow reserved words as property names by dot operator assignment, verified with hasOwnProperty: while, debugger, function",
|
||||||
|
|
||||||
|
test: function testcase() {
|
||||||
|
var tokenCodes = {};
|
||||||
|
tokenCodes.while = 0;
|
||||||
|
tokenCodes.debugger = 1;
|
||||||
|
tokenCodes.function = 2;
|
||||||
|
var arr = [
|
||||||
|
'while' ,
|
||||||
|
'debugger',
|
||||||
|
'function'
|
||||||
|
];
|
||||||
|
for(var p in tokenCodes) {
|
||||||
|
for(var p1 in arr) {
|
||||||
|
if(arr[p1] === p) {
|
||||||
|
if(!tokenCodes.hasOwnProperty(arr[p1])) {
|
||||||
|
return false;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
},
|
||||||
|
|
||||||
|
precondition: function prereq() { return true;
|
||||||
|
}
|
||||||
|
});
|
@ -0,0 +1,53 @@
|
|||||||
|
/// 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.6.1-2-8",
|
||||||
|
|
||||||
|
path: "TestCases/chapter07/7.6/7.6.1/7.6.1-2-8.js",
|
||||||
|
|
||||||
|
description: "Allow reserved words as property names by dot operator assignment, verified with hasOwnProperty: this, with, default",
|
||||||
|
|
||||||
|
test: function testcase() {
|
||||||
|
var tokenCodes = {};
|
||||||
|
tokenCodes.this = 0;
|
||||||
|
tokenCodes.with = 1;
|
||||||
|
tokenCodes.default = 2;
|
||||||
|
var arr = [
|
||||||
|
'this',
|
||||||
|
'with',
|
||||||
|
'default'
|
||||||
|
];
|
||||||
|
for(var p in tokenCodes) {
|
||||||
|
for(var p1 in arr) {
|
||||||
|
if(arr[p1] === p) {
|
||||||
|
if(!tokenCodes.hasOwnProperty(arr[p1])) {
|
||||||
|
return false;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
},
|
||||||
|
|
||||||
|
precondition: function prereq() { return true;
|
||||||
|
}
|
||||||
|
});
|
@ -0,0 +1,53 @@
|
|||||||
|
/// 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.6.1-2-9",
|
||||||
|
|
||||||
|
path: "TestCases/chapter07/7.6/7.6.1/7.6.1-2-9.js",
|
||||||
|
|
||||||
|
description: "Allow reserved words as property names by dot operator assignment, verified with hasOwnProperty: if, throw, delete",
|
||||||
|
|
||||||
|
test: function testcase() {
|
||||||
|
var tokenCodes = {};
|
||||||
|
tokenCodes.if = 0;
|
||||||
|
tokenCodes.throw = 1;
|
||||||
|
tokenCodes.delete = 2;
|
||||||
|
var arr = [
|
||||||
|
'if',
|
||||||
|
'throw',
|
||||||
|
'delete'
|
||||||
|
];
|
||||||
|
for(var p in tokenCodes) {
|
||||||
|
for(var p1 in arr) {
|
||||||
|
if(arr[p1] === p) {
|
||||||
|
if(!tokenCodes.hasOwnProperty(arr[p1])) {
|
||||||
|
return false;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
},
|
||||||
|
|
||||||
|
precondition: function prereq() { return true;
|
||||||
|
}
|
||||||
|
});
|
@ -0,0 +1,53 @@
|
|||||||
|
/// 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.6.1-3-1",
|
||||||
|
|
||||||
|
path: "TestCases/chapter07/7.6/7.6.1/7.6.1-3-1.js",
|
||||||
|
|
||||||
|
description: "Allow reserved words as property names by index assignment,verified with hasOwnProperty: null, true, false",
|
||||||
|
|
||||||
|
test: function testcase() {
|
||||||
|
var tokenCodes = {};
|
||||||
|
tokenCodes['null'] = 0;
|
||||||
|
tokenCodes['true'] = 1;
|
||||||
|
tokenCodes['false'] = 2;
|
||||||
|
var arr = [
|
||||||
|
'null',
|
||||||
|
'true',
|
||||||
|
'false'
|
||||||
|
];
|
||||||
|
for(var p in tokenCodes) {
|
||||||
|
for(var p1 in arr) {
|
||||||
|
if(arr[p1] === p) {
|
||||||
|
if(!tokenCodes.hasOwnProperty(arr[p1])) {
|
||||||
|
return false;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
},
|
||||||
|
|
||||||
|
precondition: function prereq() { return true;
|
||||||
|
}
|
||||||
|
});
|
@ -0,0 +1,53 @@
|
|||||||
|
/// 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.6.1-3-10",
|
||||||
|
|
||||||
|
path: "TestCases/chapter07/7.6/7.6.1/7.6.1-3-10.js",
|
||||||
|
|
||||||
|
description: "Allow reserved words as property names by index assignment,verified with hasOwnProperty: in, try, class",
|
||||||
|
|
||||||
|
test: function testcase() {
|
||||||
|
var tokenCodes = {};
|
||||||
|
tokenCodes['in'] = 0;
|
||||||
|
tokenCodes['try'] = 1;
|
||||||
|
tokenCodes['class'] = 2;
|
||||||
|
var arr = [
|
||||||
|
'in',
|
||||||
|
'try',
|
||||||
|
'class'
|
||||||
|
];
|
||||||
|
for(var p in tokenCodes) {
|
||||||
|
for(var p1 in arr) {
|
||||||
|
if(arr[p1] === p) {
|
||||||
|
if(!tokenCodes.hasOwnProperty(arr[p1])) {
|
||||||
|
return false;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
},
|
||||||
|
|
||||||
|
precondition: function prereq() { return true;
|
||||||
|
}
|
||||||
|
});
|
@ -0,0 +1,53 @@
|
|||||||
|
/// 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.6.1-3-11",
|
||||||
|
|
||||||
|
path: "TestCases/chapter07/7.6/7.6.1/7.6.1-3-11.js",
|
||||||
|
|
||||||
|
description: "Allow reserved words as property names by index assignment,verified with hasOwnProperty: enum, extends, super",
|
||||||
|
|
||||||
|
test: function testcase() {
|
||||||
|
var tokenCodes = {};
|
||||||
|
tokenCodes['enum'] = 0;
|
||||||
|
tokenCodes['extends'] = 1;
|
||||||
|
tokenCodes['super'] = 2;
|
||||||
|
var arr = [
|
||||||
|
'enum',
|
||||||
|
'extends',
|
||||||
|
'super'
|
||||||
|
];
|
||||||
|
for(var p in tokenCodes) {
|
||||||
|
for(var p1 in arr) {
|
||||||
|
if(arr[p1] === p) {
|
||||||
|
if(!tokenCodes.hasOwnProperty(arr[p1])) {
|
||||||
|
return false;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
},
|
||||||
|
|
||||||
|
precondition: function prereq() { return true;
|
||||||
|
}
|
||||||
|
});
|
@ -0,0 +1,53 @@
|
|||||||
|
/// 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.6.1-3-12",
|
||||||
|
|
||||||
|
path: "TestCases/chapter07/7.6/7.6.1/7.6.1-3-12.js",
|
||||||
|
|
||||||
|
description: "Allow reserved words as property names by index assignment,verified with hasOwnProperty: const, export, import",
|
||||||
|
|
||||||
|
test: function testcase() {
|
||||||
|
var tokenCodes = {};
|
||||||
|
tokenCodes['const'] = 0;
|
||||||
|
tokenCodes['export'] = 1;
|
||||||
|
tokenCodes['import'] = 2;
|
||||||
|
var arr = [
|
||||||
|
'const',
|
||||||
|
'export',
|
||||||
|
'import'
|
||||||
|
];
|
||||||
|
for(var p in tokenCodes) {
|
||||||
|
for(var p1 in arr) {
|
||||||
|
if(arr[p1] === p) {
|
||||||
|
if(!tokenCodes.hasOwnProperty(arr[p1])) {
|
||||||
|
return false;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
},
|
||||||
|
|
||||||
|
precondition: function prereq() { return true;
|
||||||
|
}
|
||||||
|
});
|
@ -0,0 +1,53 @@
|
|||||||
|
/// 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.6.1-3-13",
|
||||||
|
|
||||||
|
path: "TestCases/chapter07/7.6/7.6.1/7.6.1-3-13.js",
|
||||||
|
|
||||||
|
description: "Allow reserved words as property names by index assignment,verified with hasOwnProperty: implements, let, private",
|
||||||
|
|
||||||
|
test: function testcase() {
|
||||||
|
var tokenCodes = {};
|
||||||
|
tokenCodes['implements'] = 0;
|
||||||
|
tokenCodes['let'] = 1;
|
||||||
|
tokenCodes['private'] = 2;
|
||||||
|
var arr = [
|
||||||
|
'implements',
|
||||||
|
'let',
|
||||||
|
'private'
|
||||||
|
];
|
||||||
|
for(var p in tokenCodes) {
|
||||||
|
for(var p1 in arr) {
|
||||||
|
if(arr[p1] === p) {
|
||||||
|
if(!tokenCodes.hasOwnProperty(arr[p1])) {
|
||||||
|
return false;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
},
|
||||||
|
|
||||||
|
precondition: function prereq() { return true;
|
||||||
|
}
|
||||||
|
});
|
@ -0,0 +1,53 @@
|
|||||||
|
/// 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.6.1-3-14",
|
||||||
|
|
||||||
|
path: "TestCases/chapter07/7.6/7.6.1/7.6.1-3-14.js",
|
||||||
|
|
||||||
|
description: "Allow reserved words as property names by index assignment,verified with hasOwnProperty: public, yield, interface",
|
||||||
|
|
||||||
|
test: function testcase() {
|
||||||
|
var tokenCodes = {};
|
||||||
|
tokenCodes['public'] = 0;
|
||||||
|
tokenCodes['yield'] = 1;
|
||||||
|
tokenCodes['interface'] = 2;
|
||||||
|
var arr = [
|
||||||
|
'public',
|
||||||
|
'yield',
|
||||||
|
'interface'
|
||||||
|
];
|
||||||
|
for(var p in tokenCodes) {
|
||||||
|
for(var p1 in arr) {
|
||||||
|
if(arr[p1] === p) {
|
||||||
|
if(!tokenCodes.hasOwnProperty(arr[p1])) {
|
||||||
|
return false;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
},
|
||||||
|
|
||||||
|
precondition: function prereq() { return true;
|
||||||
|
}
|
||||||
|
});
|
@ -0,0 +1,53 @@
|
|||||||
|
/// 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.6.1-3-15",
|
||||||
|
|
||||||
|
path: "TestCases/chapter07/7.6/7.6.1/7.6.1-3-15.js",
|
||||||
|
|
||||||
|
description: "Allow reserved words as property names by index assignment,verified with hasOwnProperty: package, protected, static",
|
||||||
|
|
||||||
|
test: function testcase() {
|
||||||
|
var tokenCodes = {};
|
||||||
|
tokenCodes['package'] = 0;
|
||||||
|
tokenCodes['protected'] = 1;
|
||||||
|
tokenCodes['static'] = 2;
|
||||||
|
var arr = [
|
||||||
|
'package',
|
||||||
|
'protected',
|
||||||
|
'static'
|
||||||
|
];
|
||||||
|
for(var p in tokenCodes) {
|
||||||
|
for(var p1 in arr) {
|
||||||
|
if(arr[p1] === p) {
|
||||||
|
if(!tokenCodes.hasOwnProperty(arr[p1])) {
|
||||||
|
return false;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
},
|
||||||
|
|
||||||
|
precondition: function prereq() { return true;
|
||||||
|
}
|
||||||
|
});
|
@ -0,0 +1,53 @@
|
|||||||
|
/// 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.6.1-3-16",
|
||||||
|
|
||||||
|
path: "TestCases/chapter07/7.6/7.6.1/7.6.1-3-16.js",
|
||||||
|
|
||||||
|
description: "Allow reserved words as property names by index assignment,verified with hasOwnProperty: undefined, NaN, Infinity",
|
||||||
|
|
||||||
|
test: function testcase() {
|
||||||
|
var tokenCodes = {};
|
||||||
|
tokenCodes['undefined'] = 0;
|
||||||
|
tokenCodes['NaN'] = 1;
|
||||||
|
tokenCodes['Infinity'] = 2;
|
||||||
|
var arr = [
|
||||||
|
'undefined',
|
||||||
|
'NaN',
|
||||||
|
'Infinity'
|
||||||
|
];
|
||||||
|
for(var p in tokenCodes) {
|
||||||
|
for(var p1 in arr) {
|
||||||
|
if(arr[p1] === p) {
|
||||||
|
if(!tokenCodes.hasOwnProperty(arr[p1])) {
|
||||||
|
return false;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
},
|
||||||
|
|
||||||
|
precondition: function prereq() { return true;
|
||||||
|
}
|
||||||
|
});
|
@ -0,0 +1,53 @@
|
|||||||
|
/// 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.6.1-3-2",
|
||||||
|
|
||||||
|
path: "TestCases/chapter07/7.6/7.6.1/7.6.1-3-2.js",
|
||||||
|
|
||||||
|
description: "Allow reserved words as property names by index assignment,verified with hasOwnProperty: break, case, do",
|
||||||
|
|
||||||
|
test: function testcase() {
|
||||||
|
var tokenCodes = {};
|
||||||
|
tokenCodes['break'] = 0;
|
||||||
|
tokenCodes['case'] = 1;
|
||||||
|
tokenCodes['do'] = 2;
|
||||||
|
var arr = [
|
||||||
|
'break',
|
||||||
|
'case',
|
||||||
|
'do'
|
||||||
|
];
|
||||||
|
for(var p in tokenCodes) {
|
||||||
|
for(var p1 in arr) {
|
||||||
|
if(arr[p1] === p) {
|
||||||
|
if(!tokenCodes.hasOwnProperty(arr[p1])) {
|
||||||
|
return false;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
},
|
||||||
|
|
||||||
|
precondition: function prereq() { return true;
|
||||||
|
}
|
||||||
|
});
|
@ -0,0 +1,53 @@
|
|||||||
|
/// 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.6.1-3-3",
|
||||||
|
|
||||||
|
path: "TestCases/chapter07/7.6/7.6.1/7.6.1-3-3.js",
|
||||||
|
|
||||||
|
description: "Allow reserved words as property names by index assignment,verified with hasOwnProperty: instanceof, typeof, else",
|
||||||
|
|
||||||
|
test: function testcase() {
|
||||||
|
var tokenCodes = {};
|
||||||
|
tokenCodes['instanceof'] = 0;
|
||||||
|
tokenCodes['typeof'] = 1;
|
||||||
|
tokenCodes['else'] = 2;
|
||||||
|
var arr = [
|
||||||
|
'instanceof',
|
||||||
|
'typeof',
|
||||||
|
'else'
|
||||||
|
];
|
||||||
|
for(var p in tokenCodes) {
|
||||||
|
for(var p1 in arr) {
|
||||||
|
if(arr[p1] === p) {
|
||||||
|
if(!tokenCodes.hasOwnProperty(arr[p1])) {
|
||||||
|
return false;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
},
|
||||||
|
|
||||||
|
precondition: function prereq() { return true;
|
||||||
|
}
|
||||||
|
});
|
@ -0,0 +1,53 @@
|
|||||||
|
/// 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.6.1-3-4",
|
||||||
|
|
||||||
|
path: "TestCases/chapter07/7.6/7.6.1/7.6.1-3-4.js",
|
||||||
|
|
||||||
|
description: "Allow reserved words as property names by index assignment,verified with hasOwnProperty: new, var, catch",
|
||||||
|
|
||||||
|
test: function testcase() {
|
||||||
|
var tokenCodes = {};
|
||||||
|
tokenCodes['new'] = 0;
|
||||||
|
tokenCodes['var'] = 1;
|
||||||
|
tokenCodes['catch'] = 2;
|
||||||
|
var arr = [
|
||||||
|
'new',
|
||||||
|
'var',
|
||||||
|
'catch'
|
||||||
|
];
|
||||||
|
for(var p in tokenCodes) {
|
||||||
|
for(var p1 in arr) {
|
||||||
|
if(arr[p1] === p) {
|
||||||
|
if(!tokenCodes.hasOwnProperty(arr[p1])) {
|
||||||
|
return false;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
},
|
||||||
|
|
||||||
|
precondition: function prereq() { return true;
|
||||||
|
}
|
||||||
|
});
|
@ -0,0 +1,53 @@
|
|||||||
|
/// 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.6.1-3-5",
|
||||||
|
|
||||||
|
path: "TestCases/chapter07/7.6/7.6.1/7.6.1-3-5.js",
|
||||||
|
|
||||||
|
description: "Allow reserved words as property names by index assignment,verified with hasOwnProperty: finally, return, void",
|
||||||
|
|
||||||
|
test: function testcase() {
|
||||||
|
var tokenCodes = {};
|
||||||
|
tokenCodes['finally'] = 0;
|
||||||
|
tokenCodes['return'] = 1;
|
||||||
|
tokenCodes['void'] = 2;
|
||||||
|
var arr = [
|
||||||
|
'finally',
|
||||||
|
'return',
|
||||||
|
'void'
|
||||||
|
];
|
||||||
|
for(var p in tokenCodes) {
|
||||||
|
for(var p1 in arr) {
|
||||||
|
if(arr[p1] === p) {
|
||||||
|
if(!tokenCodes.hasOwnProperty(arr[p1])) {
|
||||||
|
return false;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
},
|
||||||
|
|
||||||
|
precondition: function prereq() { return true;
|
||||||
|
}
|
||||||
|
});
|
@ -0,0 +1,53 @@
|
|||||||
|
/// 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.6.1-3-6",
|
||||||
|
|
||||||
|
path: "TestCases/chapter07/7.6/7.6.1/7.6.1-3-6.js",
|
||||||
|
|
||||||
|
description: "Allow reserved words as property names by index assignment,verified with hasOwnProperty: continue, for, switch",
|
||||||
|
|
||||||
|
test: function testcase() {
|
||||||
|
var tokenCodes = {};
|
||||||
|
tokenCodes['continue'] = 0;
|
||||||
|
tokenCodes['for'] = 1;
|
||||||
|
tokenCodes['switch'] = 2;
|
||||||
|
var arr = [
|
||||||
|
'continue',
|
||||||
|
'for',
|
||||||
|
'switch'
|
||||||
|
];
|
||||||
|
for(var p in tokenCodes) {
|
||||||
|
for(var p1 in arr) {
|
||||||
|
if(arr[p1] === p) {
|
||||||
|
if(!tokenCodes.hasOwnProperty(arr[p1])) {
|
||||||
|
return false;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
},
|
||||||
|
|
||||||
|
precondition: function prereq() { return true;
|
||||||
|
}
|
||||||
|
});
|
@ -0,0 +1,53 @@
|
|||||||
|
/// 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.6.1-3-7",
|
||||||
|
|
||||||
|
path: "TestCases/chapter07/7.6/7.6.1/7.6.1-3-7.js",
|
||||||
|
|
||||||
|
description: "Allow reserved words as property names by index assignment,verified with hasOwnProperty: while, debugger, function",
|
||||||
|
|
||||||
|
test: function testcase() {
|
||||||
|
var tokenCodes = {};
|
||||||
|
tokenCodes['while'] = 0;
|
||||||
|
tokenCodes['debugger'] = 1;
|
||||||
|
tokenCodes['function'] = 2;
|
||||||
|
var arr = [
|
||||||
|
'while',
|
||||||
|
'debugger',
|
||||||
|
'function'
|
||||||
|
];
|
||||||
|
for(var p in tokenCodes) {
|
||||||
|
for(var p1 in arr) {
|
||||||
|
if(arr[p1] === p) {
|
||||||
|
if(!tokenCodes.hasOwnProperty(arr[p1])) {
|
||||||
|
return false;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
},
|
||||||
|
|
||||||
|
precondition: function prereq() { return true;
|
||||||
|
}
|
||||||
|
});
|
@ -0,0 +1,53 @@
|
|||||||
|
/// 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.6.1-3-8",
|
||||||
|
|
||||||
|
path: "TestCases/chapter07/7.6/7.6.1/7.6.1-3-8.js",
|
||||||
|
|
||||||
|
description: "Allow reserved words as property names by index assignment,verified with hasOwnProperty: this, with, default",
|
||||||
|
|
||||||
|
test: function testcase() {
|
||||||
|
var tokenCodes = {};
|
||||||
|
tokenCodes['this'] = 0;
|
||||||
|
tokenCodes['with'] = 1;
|
||||||
|
tokenCodes['default'] = 2;
|
||||||
|
var arr = [
|
||||||
|
'this',
|
||||||
|
'with',
|
||||||
|
'default'
|
||||||
|
];
|
||||||
|
for(var p in tokenCodes) {
|
||||||
|
for(var p1 in arr) {
|
||||||
|
if(arr[p1] === p) {
|
||||||
|
if(!tokenCodes.hasOwnProperty(arr[p1])) {
|
||||||
|
return false;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
},
|
||||||
|
|
||||||
|
precondition: function prereq() { return true;
|
||||||
|
}
|
||||||
|
});
|
@ -0,0 +1,53 @@
|
|||||||
|
/// 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.6.1-3-9",
|
||||||
|
|
||||||
|
path: "TestCases/chapter07/7.6/7.6.1/7.6.1-3-9.js",
|
||||||
|
|
||||||
|
description: "Allow reserved words as property names by index assignment,verified with hasOwnProperty: if, throw, delete",
|
||||||
|
|
||||||
|
test: function testcase() {
|
||||||
|
var tokenCodes = {};
|
||||||
|
tokenCodes['if'] = 0;
|
||||||
|
tokenCodes['throw'] = 1;
|
||||||
|
tokenCodes['delete'] = 2;
|
||||||
|
var arr = [
|
||||||
|
'if',
|
||||||
|
'throw',
|
||||||
|
'delete'
|
||||||
|
];
|
||||||
|
for(var p in tokenCodes) {
|
||||||
|
for(var p1 in arr) {
|
||||||
|
if(arr[p1] === p) {
|
||||||
|
if(!tokenCodes.hasOwnProperty(arr[p1])) {
|
||||||
|
return false;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
},
|
||||||
|
|
||||||
|
precondition: function prereq() { return true;
|
||||||
|
}
|
||||||
|
});
|
@ -0,0 +1,70 @@
|
|||||||
|
/// 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.6.1-4-1",
|
||||||
|
|
||||||
|
path: "TestCases/chapter07/7.6/7.6.1/7.6.1-4-1.js",
|
||||||
|
|
||||||
|
description: "Allow reserved words as property names by set function within an object, verified with hasOwnProperty: null, true, false",
|
||||||
|
|
||||||
|
test: function testcase() {
|
||||||
|
var test0 = 0, test1 = 1, test2 = 2;
|
||||||
|
var tokenCodes = {
|
||||||
|
set null(value) {
|
||||||
|
test0 = value;
|
||||||
|
},
|
||||||
|
get null() {
|
||||||
|
return test0;
|
||||||
|
},
|
||||||
|
set true(value) {
|
||||||
|
test1 = value;
|
||||||
|
},
|
||||||
|
get true() {
|
||||||
|
return test1;
|
||||||
|
},
|
||||||
|
set false(value) {
|
||||||
|
test2 = value;
|
||||||
|
},
|
||||||
|
get false(){
|
||||||
|
return test2;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
var arr = [
|
||||||
|
'null',
|
||||||
|
'true',
|
||||||
|
'false'
|
||||||
|
];
|
||||||
|
for(var p in tokenCodes) {
|
||||||
|
for(var p1 in arr) {
|
||||||
|
if(arr[p1] === p) {
|
||||||
|
if(!tokenCodes.hasOwnProperty(arr[p1])) {
|
||||||
|
return false;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
},
|
||||||
|
|
||||||
|
precondition: function prereq() { return true;
|
||||||
|
}
|
||||||
|
});
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user