ES5conform Wiki & Documentation Rss Feedhttp://es5conform.codeplex.com/Wiki/View.aspx?title=HomeES5conform Wiki Rss DescriptionUpdated Wiki: Homehttp://es5conform.codeplex.com/wikipage?version=20<div class="wikidoc"><h2><u>A New Home for ES5Conform</u></h2>
The goal of the ES5Conform CodePlex project was to build a suite of tests for new features added in the 5th edition of the ECMAScript language specification. As this test suite matured, it became desirable to extend it with tests for features added in earlier versions of the ECMAScript standard that are still present in the 5th edition today. A comprehensive test suite for the 5th edition in its entirety is extremely useful for JavaScript implementers. <br /><br />To achieve this goal, <b>the tests from ES5Conform (which were focused on ECMAScript 5) have been contributed along with Google’s Sputnik tests (focused on ECMAScript 3) to Test262, a test suite supported by the ECMAScript committee. To this end, all active development on ES5Conform has been migrated to test262 and test defects are now tracked on <a href="http://bugs.ecmascript.org" class="externalLink">http://bugs.ecmascript.org<span class="externalLinkIcon"></span></a></b>. Other improvements were made in the transition to test262, and the best example of this is that the entire test suite is conveniently runnable directly from the test262 website. Also worth pointing out is that development of test262 is now an actual project of the TC39 committee, and test262 resides in the ecmascript.org web domain. You can find more info about test262 on its official website, <a href="http://test262.ecmascript.org" class="externalLink">http://test262.ecmascript.org<span class="externalLinkIcon"></span></a>, or via the test262 mailing list - see <a href="https://mail.mozilla.org/listinfo/test262-discuss" class="externalLink">https://mail.mozilla.org/listinfo/test262-discuss<span class="externalLinkIcon"></span></a>. Finally, the original version of ES5Conform&#39;s CodePlex project page has been archived <a href="http://es5conform.codeplex.com/documentation" class="externalLink">here<span class="externalLinkIcon"></span></a>.<br /><br />We thank everyone whose contributed to ES5Conform over the years, and hope you’ll bring the same passion for a standardized web to the test262 effort.<br /><br /><i>The ES5Conform Team</i><br /></div><div class="ClearBoth"></div>dfugateMon, 08 Aug 2011 17:57:03 GMTUpdated Wiki: Home 20110808055703PUpdated Wiki: Documentationhttp://es5conform.codeplex.com/documentation?version=1<div class="wikidoc"><h1>This page is deprecated and all ES5Conform tests have been contributed to ECMA&#39;s <a href="http://test262.ecmascript.org" class="externalLink">test262<span class="externalLinkIcon"></span></a> project.</h1>
<hr />
<h3>Project Description</h3>
The goal of this project was to develop a test suite that could be used to determine how closely a JavaScript implementation conforms to the ECMAScript, 5th Edition Language Specification. We hope that the availability of a common conformance test suite will help browser implementers achieve a very high degree of interoperability for their ECMAScript 5 implementations.<br />
<h3>What is ECMAScript 5</h3>
&quot;ECMAScript&quot; is the name under which the language more commonly known as &quot;JavaScript&quot; is standardized. Development of the ECMAScript standard is the responsibility of <a href="http://www.ecma-international.org/memento/TC39.htm" class="externalLink">Technical Committee 39 (TC39)<span class="externalLinkIcon"></span></a> of <a href="http://www.ecma-international.org/" class="externalLink">Ecma International<span class="externalLinkIcon"></span></a>. The ECMAScript standard is officially known as ECMA-262. ECMAScript 5 (or just ES5) is short hand for the &quot;ECMA-262, 5th Edition ECMAScript Language Specification&quot; the official name of the standard.<br /><br />ECMAScript 5 was approved as an offical Ecma standard by the the Ecma General Assembly on December 3, 2009. The <a href="http://www.ecma-international.org/publications/files/ECMA-ST/ECMA-262.pdf" class="externalLink">ECMAScript 5 Specification (PDF)<span class="externalLinkIcon"></span></a> is available from the Ecma International web site. <br />
<h3>Project Coordination and Participation</h3>
The coordinators of this project represent organizations that are members of ECMA and participants in TC39. This project is being carried out in cooperation with ECMA TC39 but the actual operation of this development project is not currently an official ECMA activity. It is possible this some or all of this test suite may be formally adopted by TC39 as a formal ECMA publication.<br /><br />TC39 members and other with an active interest in test ECMAScript implementations are invited to participate by running tests, identify issues, contributing tests, or becoming active developers on this project. Path submissions are welcomed from everyone.
<h3>Contributors</h3>
<ul><li>Microsoft contributed the original set of approximately 900 tests.</li></ul>
<h3>License</h3>
All files in this project are licensed using the New BSD license. See the license tab of this project for the actual license text.
<h3>Downloading and Running the Tests</h3>
Simply go to the Downloads tab, download the latest release, unzip it, and open runtests.html in the browser you want to test. If you want to run the tests in a non-browser environment you could contribute to this project by writing an <a href="http://es5conform.codeplex.com/workitem/23271">appropriate test driver</a>.<br />.
<h3>Test Organization and Conventions</h3>
The tests are arranged in a hierarchy that reflects the organization of the ECMAScript 5 Specification. The organization is explained <a href="http://es5conform.codeplex.com/wikipage?title=testOrg&referringTitle=Documentation">here</a>.<br /></div><div class="ClearBoth"></div>dfugateMon, 08 Aug 2011 17:44:22 GMTUpdated Wiki: Documentation 20110808054422PUpdated Wiki: Homehttp://es5conform.codeplex.com/wikipage?version=19<div class="wikidoc"><h2><u>A New Home for ES5Conform</u></h2>
The goal of the ES5Conform CodePlex project was to build a suite of tests for new features added in the 5th edition of the ECMAScript language specification. As this test suite matured, it became desirable to extend it with tests for features added in earlier versions of the ECMAScript standard that are still present in the 5th edition today. A comprehensive test suite for the 5th edition in its entirety is extremely useful for JavaScript implementers. <br /><br />To achieve this goal, <b>the tests from ES5Conform (which were focused on ECMAScript 5) have been contributed along with Google’s Sputnik tests (focused on ECMAScript 3) to Test262, a test suite supported by the ECMAScript committee. To this end, all active development on ES5Conform has been migrated to test262 and test defects are now tracked on <a href="http://bugs.ecmascript.org" class="externalLink">http://bugs.ecmascript.org<span class="externalLinkIcon"></span></a></b>. Other improvements were made in the transition to test262, and the best example of this is that the entire test suite is conveniently runnable directly from the test262 website. Also worth pointing out is that development of test262 is now an actual project of the TC39 committee, and test262 resides in the ecmascript.org web domain. You can find more info about test262 on its official website, <a href="http://test262.ecmascript.org" class="externalLink">http://test262.ecmascript.org<span class="externalLinkIcon"></span></a>, or via the test262 mailing list - see <a href="https://mail.mozilla.org/listinfo/test262-discuss" class="externalLink">https://mail.mozilla.org/listinfo/test262-discuss<span class="externalLinkIcon"></span></a>.<br /><br />We thank everyone whose contributed to ES5Conform over the years, and hope you’ll bring the same passion for a standardized web to the test262 effort.<br /><br /><i>The ES5Conform Team</i><br /></div><div class="ClearBoth"></div>dfugateMon, 08 Aug 2011 17:38:33 GMTUpdated Wiki: Home 20110808053833PUpdated Wiki: Homehttp://es5conform.codeplex.com/wikipage?version=18<div class="wikidoc"><h1>ECMAScript 5 Conformance Suite</h1>
<h3>Project Description</h3>
The goal of this project is to develop a test suite that can be used to determine how closely a JavaScript implementation conforms to the ECMAScript, 5th Edition Language Specification. We hope that the availability of a common conformance test suite will help browser implementers achieve a very high degree of interoperability for their ECMAScript 5 implementations.<br />
<h3>What is ECMAScript 5</h3>
&quot;ECMAScript&quot; is the name under which the language more commonly known as &quot;JavaScript&quot; is standardized. Development of the ECMAScript standard is the responsibility of <a href="http://www.ecma-international.org/memento/TC39.htm" class="externalLink">Technical Committee 39 (TC39)<span class="externalLinkIcon"></span></a> of <a href="http://www.ecma-international.org/" class="externalLink">Ecma International<span class="externalLinkIcon"></span></a>. The ECMAScript standard is officially known as ECMA-262. ECMAScript 5 (or just ES5) is short hand for the &quot;ECMA-262, 5th Edition ECMAScript Language Specification&quot; the official name of the standard.<br /><br />ECMAScript 5 was approved as an offical Ecma standard by the the Ecma General Assembly on December 3, 2009. The <a href="http://www.ecma-international.org/publications/files/ECMA-ST/ECMA-262.pdf" class="externalLink">ECMAScript 5 Specification (PDF)<span class="externalLinkIcon"></span></a> is available from the Ecma International web site. <br />
<h3>Project Coordination and Participation</h3>
The coordinators of this project represent organizations that are members of ECMA and participants in TC39. This project is being carried out in cooperation with ECMA TC39 but the actual operation of this development project is not currently an official ECMA activity. It is possible this some or all of this test suite may be formally adopted by TC39 as a formal ECMA publication.<br /><br />TC39 members and other with an active interest in test ECMAScript implementations are invited to participate by running tests, identify issues, contributing tests, or becoming active developers on this project. Path submissions are welcomed from everyone.
<h3>Contributors</h3>
<ul><li>Microsoft contributed the original set of approximately 900 tests.</li></ul>
<h3>License</h3>
All files in this project are licensed using the New BSD license. See the license tab of this project for the actual license text.
<h3>Downloading and Running the Tests</h3>
Simply go to the Downloads tab, download the latest release, unzip it, and open runtests.html in the browser you want to test. If you want to run the tests in a non-browser environment you could contribute to this project by writing an <a href="http://es5conform.codeplex.com/WorkItem/View.aspx?WorkItemId=23271">appropriate test driver</a>.<br />.
<h3>Test Organization and Conventions</h3>
The tests are arranged in a hierarchy that reflects the organization of the ECMAScript 5 Specification. The organization is explained <a href="http://es5conform.codeplex.com/wikipage?title=testOrg&referringTitle=Home">here</a>.<br /><br /></div><div class="ClearBoth"></div>allenwbMon, 14 Dec 2009 18:36:41 GMTUpdated Wiki: Home 20091214063641PUpdated Wiki: testOrghttp://es5conform.codeplex.com/Wiki/View.aspx?title=testOrg&version=12<div class="wikidoc"><h3>Test File Directory Hierarchy</h3>
<hr />
With in the <b>TestCases</b> directory individual tests are organized into subdirectories corresponding to chapters (top level section numbers) of the ECMAScript 5 Specification.<br />For Example:<br /><pre>
TestCases
chapter11
11.1
11.4
11.4.1
chapter12
12.10
chapter13
</pre>
<h3>Test File Naming Conventions</h3>
<hr />
Individual test files have the following format:<br /><br /><i>sectionNumber</i>[<b>@</b><i>n</i>][<b>-</b><i>algorithmStepNumber</i>|<b>-g</b><i>grammarProductionNumber</i>]<b>-</b><i>testNumber</i>[<b>-</b>s][x].js<br /><br />Where:<br /><i>sectionNumber</i>: is the section number of the ECMAScript 5 Specification that this test is primarily concerned with.<br />@<i>n</i>: is optional and used if a section contains more than one algorithm. <i>n</i> is ordinal number of the algorithm within the section.<br /><i>algorithmStepNumber</i>: is the step number within the algorithm that the rest relates to. It maybe excluded for tests that relate to non-algorithmic sections of the specification. 0 is used to reference the non-algorithmic part of sections that include both algorithmic and non-algorithmetic content.<br /><b>g</b><i>grammarProductionNumber</i>: is an ordinal number (starting from 1) of a grammar production defined in the section. It is used for parsing related tests.<br /><i>testNumber</i>: is present if there is more than one testcase for a particular algorithm step or non-algorithm specification section.<br />-s: is an optional suffix -s that identifies that the test is only applies to strict mode<br />x: is an optional suffix that identifies that the test intentionally contains something that should case a syntax error. Such tests are expected to not load correctly and if they do it load it is a test failure. The test function should not return true.<br />
<h3>Test File Structure</h3>
<hr />
Each testcase must be a single .js file.<br />A testcase is made up of the following parts (1) license header (2) test registration call (3) test case object literal and looks like:<br /><pre>
/// Copyright (c) &lt;&lt;year&gt;&gt; &lt;&lt;copyright owner&gt;&gt;.
///
/// 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 &lt;&lt;copyright owner&gt;&gt; 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 &amp;quot;AS IS&amp;quot; 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.
/* be sure to put your personal &lt;&lt;year&gt;&gt; and &lt;&lt;copyright owner&gt;&gt; information into the above header */
ES5Harness.registerTest( {
id: &quot;sectionNumber[@nnn][-algorithmStepNumber]-testNumber[-s]&quot;, //put a unique test id here
path: &quot;TestCases/testTemplate.js&quot;, //the directory path of this test starting at TestCases
description: 'Insert text descripting the test here',
test: function testcase() {
//Add test code here, return true if test passes
},
precondition: function precond() {
//Add code to test any preconditions that must be establish in order to run this test.
//Return true if it is ok to run the test.
//This property may be completely omitted in which case the test will always be run.
return true;
}
});
</pre><br />The license header is the copyright notice and New BSD license text. <br />Be sure to fill in the actual year and name of the copyright holder.<br /><br />The test registration is a JavaScript function call of the form:<br /><pre>
ES5Harness.registerTest( testObject);
</pre> <b>ES5Harness</b> is the global name of the test harness and <b>registerTest</b> is the method that is used to register tests. <br />The argument is an object that defines an individual test. Normally the argument <i>testObject</i>is an object literal. <br /><br />A test case object has the following properties:
<ul><li><b>id</b>: A string containing the name of this test file using the above naming conventions. The file extension is not included in the id.</li>
<li><b>path</b>: A string containing the relative directory path of this test starting at TestCases.</li>
<li><b>description</b>: A string describing the purpose of this test.&amp;nbsp; It is used to generate test reports.</li>
<li><b>test</b>: A function that performs the actual test. The test harness will call this function to execute the test.&amp;nbsp; It must return true if the test passes. Any other return value indicates a failed test. The test function is called as a method with its this value set to its defining test case object.</li>
<li><b>precondition</b>: (Optional) A function that is called before the test function to see if it is ok to run the test.&amp;nbsp; If all preconditions necessary to run the test are established it should return true. If it returns , the test will not be run.&amp;nbsp; The precondition function is called as a method with its this value set to its defining test case object. This property is optional. If it is not present, the test function will always be executed.</li></ul>
<br />A text case object may also define other properties. The test case file may also contain additional global code and declarations. However, this is not recommended unless necessary for creating a test relating to global access. <br /><br /></div><div class="ClearBoth"></div>allenwbWed, 12 Aug 2009 20:14:42 GMTUpdated Wiki: testOrg 20090812081442PUpdated Wiki: testOrghttp://es5conform.codeplex.com/Wiki/View.aspx?title=testOrg&version=11<div class="wikidoc"><h3>Test File Directory Hierarchy</h3>
<hr />
With in the <b>TestCases</b> directory individual tests are organized into subdirectories corresponding to chapters (top level section numbers) of the ECMAScript 5 Specification.<br />For Example:<br /><pre>
TestCases
chapter11
11.1
11.4
11.4.1
chapter12
12.10
chapter13
</pre>
<h3>Test File Naming Conventions</h3>
<hr />
Individual test files have the following format:<br /><br /><i>sectionNumber</i>[<b>@</b><i>n</i>][<b>-</b><i>algorithmStepNumber</i>|<b>-g</b><i>grammarProductionNumber</i>]<b>-</b><i>testNumber</i>[<b>-</b>s][x].js<br /><br />Where:<br /><i>sectionNumber</i>: is the section number of the ECMAScript 5 Specification that this test is primarily concerned with.<br />@<i>n</i>: is optional and used if a section contains more than one algorithm. <i>n</i> is ordinal number of the algorithm within the section.<br /><i>algorithmStepNumber</i>: is the step number within the algorithm that the rest relates to. It is excluded for tests that relate to non-algorithmic sections of the specification.<br /><b>g</b><i>grammarProductionNumber</i>: is an ordinal number (starting from 1) of a grammar production defined in the section. It is used for parsing related tests.<br /><i>testNumber</i>: is present if there is more than one testcase for a particular algorithm step or non-algorithm specification section.<br />-s: is an optional suffix -s that identifies that the test is only applies to strict mode<br />x: is an optional suffix that identifies that the test intentionally contains something that should case a syntax error. Such tests are expected to not load correctly and if they do it load it is a test failure. The test function should not return true.<br />
<h3>Test File Structure</h3>
<hr />
Each testcase must be a single .js file.<br />A testcase is made up of the following parts (1) license header (2) test registration call (3) test case object literal and looks like:<br /><pre>
/// Copyright (c) &lt;&lt;year&gt;&gt; &lt;&lt;copyright owner&gt;&gt;.
///
/// 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 &lt;&lt;copyright owner&gt;&gt; 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 &amp;quot;AS IS&amp;quot; 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.
/* be sure to put your personal &lt;&lt;year&gt;&gt; and &lt;&lt;copyright owner&gt;&gt; information into the above header */
ES5Harness.registerTest( {
id: &quot;sectionNumber[@nnn][-algorithmStepNumber]-testNumber[-s]&quot;, //put a unique test id here
path: &quot;TestCases/testTemplate.js&quot;, //the directory path of this test starting at TestCases
description: 'Insert text descripting the test here',
test: function testcase() {
//Add test code here, return true if test passes
},
precondition: function precond() {
//Add code to test any preconditions that must be establish in order to run this test.
//Return true if it is ok to run the test.
//This property may be completely omitted in which case the test will always be run.
return true;
}
});
</pre><br />The license header is the copyright notice and New BSD license text. <br />Be sure to fill in the actual year and name of the copyright holder.<br /><br />The test registration is a JavaScript function call of the form:<br /><pre>
ES5Harness.registerTest( testObject);
</pre> <b>ES5Harness</b> is the global name of the test harness and <b>registerTest</b> is the method that is used to register tests. <br />The argument is an object that defines an individual test. Normally the argument <i>testObject</i>is an object literal. <br /><br />A test case object has the following properties:
<ul><li><b>id</b>: A string containing the name of this test file using the above naming conventions. The file extension is not included in the id.</li>
<li><b>path</b>: A string containing the relative directory path of this test starting at TestCases.</li>
<li><b>description</b>: A string describing the purpose of this test.&amp;nbsp; It is used to generate test reports.</li>
<li><b>test</b>: A function that performs the actual test. The test harness will call this function to execute the test.&amp;nbsp; It must return true if the test passes. Any other return value indicates a failed test. The test function is called as a method with its this value set to its defining test case object.</li>
<li><b>precondition</b>: (Optional) A function that is called before the test function to see if it is ok to run the test.&amp;nbsp; If all preconditions necessary to run the test are established it should return true. If it returns , the test will not be run.&amp;nbsp; The precondition function is called as a method with its this value set to its defining test case object. This property is optional. If it is not present, the test function will always be executed.</li></ul>
<br />A text case object may also define other properties. The test case file may also contain additional global code and declarations. However, this is not recommended unless necessary for creating a test relating to global access. <br /><br /></div><div class="ClearBoth"></div>allenwbWed, 12 Aug 2009 18:44:58 GMTUpdated Wiki: testOrg 20090812064458PUpdated Wiki: Homehttp://es5conform.codeplex.com/Wiki/View.aspx?title=Home&version=17<div class="wikidoc"><h1>ECMAScript 5 Conformance Suite</h1>
<h3>Project Description</h3>
The goal of this project is to develop a test suite that can be used to determine how closely a JavaScript implementation conforms to the ECMAScript, 5th Edition Language Specification. We hope that the availability of a common conformance test suite will help browser implementers achieve a very high degree of interoperability for their ECMAScript 5 implementations.<br />
<h3>What is ECMAScript 5</h3>
&quot;ECMAScript&quot; is the name under which the language more commonly known as &quot;JavaScript&quot; is standardized. Development of the ECMAScript standard is the responsibility of <a href="http://www.ecma-international.org/memento/TC39.htm" class="externalLink">Technical Committee 39 (TC39)<span class="externalLinkIcon"></span></a> of <a href="http://www.ecma-international.org/" class="externalLink">Ecma International<span class="externalLinkIcon"></span></a>. The ECMAScript standard is officially known as ECMA-262. ECMAScript 5 (or just ES5) is short hand for the &quot;ECMA-262, 5th Edition ECMAScript Language Specification&quot; the official name of the standard.<br /><br /><b>ECMAScript 5 is not yet a completed official standard.</b> ECMAScript 5 is currently at the <i>candidate standard</i> phase of development. This means that technical development of the feature content of the standard is complete and frozen. The <a href="http://www.ecma-international.org/publications/files/drafts/tc39-2009-025.pdf" class="externalLink">candidate ECMAScript 5 specification<span class="externalLinkIcon"></span></a> is currently undergoing public review. The only planned technical changes to the candidate specification are those necessary to correct errors discovered through the review process. <a href="http://wiki.ecmascript.org/doku.php?id=es3.1:es3.1_proposal_working_draft" class="externalLink">Known issues and errata<span class="externalLinkIcon"></span></a> for the candidate specification are also available. The current schedule calls for final approval of the ES5 standard by the end of 2009.<br />
<h3>Project Coordination and Participation</h3>
The coordinators of this project represent organizations that are members of ECMA and participants in TC39. This project is being carried out in cooperation with ECMA TC39 but the actual operation of this development project is not currently an official ECMA activity. It is possible this some or all of this test suite may be formally adopted by TC39 as a formal ECMA publication.<br /><br />TC39 members and other with an active interest in test ECMAScript implementations are invited to participate by running tests, identify issues, contributing tests, or becoming active developers on this project. Path submissions are welcomed from everyone.
<h3>Contributors</h3>
<ul><li>Microsoft contributed the original set of approximately 900 tests.</li></ul>
<h3>License</h3>
All files in this project are licensed using the New BSD license. See the license tab of this project for the actual license text.
<h3>Downloading and Running the Tests</h3>
Simply go to the Downloads tab, download the latest release, unzip it, and open runtests.html in the browser you want to test. If you want to run the tests in a non-browser environment you could contribute to this project by writing an <a href="http://es5conform.codeplex.com/WorkItem/View.aspx?WorkItemId=23271">appropriate test driver</a>.<br />.
<h3>Test Organization and Conventions</h3>
The tests are arranged in a hierarchy that reflects the organization of the ECMAScript 5 Specification. The organization is explained <a href="http://es5conform.codeplex.com/Wiki/View.aspx?title=testOrg">here</a>.<br /><br /></div>allenwbWed, 01 Jul 2009 17:22:39 GMTUpdated Wiki: Home 20090701052239PUpdated Wiki: testOrghttp://es5conform.codeplex.com/Wiki/View.aspx?title=testOrg&version=10<div class="wikidoc"><h3>Test File Directory Hierarchy</h3>
<hr />
With in the <b>TestCases</b> directory individual tests are organized into subdirectories corresponding to chapters (top level section numbers) of the ECMAScript 5 Specification.<br />For Example:<br /><pre>
TestCases
chapter11
11.1
11.4
11.4.1
chapter12
12.10
chapter13
</pre>
<h3>Test File Naming Conventions</h3>
<hr />
Individual test files have the following format:<br /><br /><i>sectionNumber</i>[<b>@</b><i>nnn</i>][<b>-</b><i>algorithmStepNumber</i>|<b>-g</b><i>grammarProductionNumber</i>]<b>-</b><i>testNumber</i>[<b>-</b>s][x].js<br /><br />Where:<br /><i>sectionNumber</i>: is the section number of the ECMAScript 5 Specification that this test is primarily concerned with.<br />@<i>n</i>: is optional and used if a section contains more than one algorithm. <i>n</i> is ordinal number of the algorithm within the section.<br /><i>algorithmStepNumber</i>: is the step number within the algorithm that the rest relates to. It is excluded for tests that relate to non-algorithmic sections of the specification.<br /><b>g</b><i>grammarProductionNumber</i>: is an ordinal number (starting from 1) of a grammar production defined in the section. It is used for parsing related tests.<br /><i>testNumber</i>: is present if there is more than one testcase for a particular algorithm step or non-algorithm specification section.<br />-s: is an optional suffix -s that identifies that the test is only applies to strict mode<br />x: is an optional suffix that identifies that the test intentionally contains something that should case a syntax error. Such tests are expected to not load correctly and if they do it load it is a test failure. The test function should not return true.<br />
<h3>Test File Structure</h3>
<hr />
Each testcase must be a single .js file.<br />A testcase is made up of the following parts (1) license header (2) test registration call (3) test case object literal and looks like:<br /><pre>
/// Copyright (c) &lt;&lt;year&gt;&gt; &lt;&lt;copyright owner&gt;&gt;.
///
/// 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 &lt;&lt;copyright owner&gt;&gt; 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 &amp;quot;AS IS&amp;quot; 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.
/* be sure to put your personal &lt;&lt;year&gt;&gt; and &lt;&lt;copyright owner&gt;&gt; information into the above header */
ES5Harness.registerTest( {
id: &quot;sectionNumber[@nnn][-algorithmStepNumber]-testNumber[-s]&quot;, //put a unique test id here
path: &quot;TestCases/testTemplate.js&quot;, //the directory path of this test starting at TestCases
description: 'Insert text descripting the test here',
test: function testcase() {
//Add test code here, return true if test passes
}
precondition: function precond() {
//Add code to test any preconditions that must be establish in order to run this test.
//Return true if it is ok to run the test.
//This property may be completely omitted in which case the test will always be run.
return true;
}
});
</pre><br />The license header is the copyright notice and New BSD license text. <br />Be sure to fill in the actual year and name of the copyright holder.<br /><br />The test registration is a JavaScript function call of the form:<br /><pre>
ES5Harness.registerTest( testObject);
</pre> <b>ES5Harness</b> is the global name of the test harness and <b>registerTest</b> is the method that is used to register tests. <br />The argument is an object that defines an individual test. Normally the argument <i>testObject</i>is an object literal. <br /><br />A test case object has the following properties:
<ul><li><b>id</b>: A string containing the name of this test file using the above naming conventions. The file extension is not included in the id.</li>
<li><b>path</b>: A string containing the relative directory path of this test starting at TestCases.</li>
<li><b>description</b>: A string describing the purpose of this test.&amp;nbsp; It is used to generate test reports.</li>
<li><b>test</b>: A function that performs the actual test. The test harness will call this function to execute the test.&amp;nbsp; It must return true if the test passes. Any other return value indicates a failed test. The test function is called as a method with its this value set to its defining test case object.</li>
<li><b>precondition</b>: (Optional) A function that is called before the test function to see if it is ok to run the test.&amp;nbsp; If all preconditions necessary to run the test are established it should return true. If it returns , the test will not be run.&amp;nbsp; The precondition function is called as a method with its this value set to its defining test case object. This property is optional. If it is not present, the test function will always be executed.</li></ul>
<br />A text case object may also define other properties. The test case file may also contain additional global code and declarations. However, this is not recommended unless necessary for creating a test relating to global access. <br /><br /></div>allenwbTue, 30 Jun 2009 00:32:31 GMTUpdated Wiki: testOrg 20090630123231AUpdated Wiki: testOrghttp://es5conform.codeplex.com/Wiki/View.aspx?title=testOrg&version=9<div class="wikidoc"><h3>Test File Directory Hierarchy</h3>
<hr />
With in the <b>TestCases</b> directory individual tests are organized into subdirectories corresponding to chapters (top level section numbers) of the ECMAScript 5 Specification.<br />For Example:<br /><pre>
TestCases
chapter11
11.1
11.4
11.4.1
chapter12
12.10
chapter13
</pre>
<h3>Test File Naming Conventions</h3>
<hr />
Individual test files have the following format:<br /><br /><i>sectionNumber</i>[<b>@</b><i>nnn</i>][<b>-</b><i>algorithmStepNumber</i>]<b>-</b><i>testNumber</i>[<b>-</b>s][x].js<br /><br />Where:<br /><i>sectionNumber</i>: is the section number of the ECMAScript 5 Specification that this test is primarily concerned with.<br />@<i>n</i>: is optional and used if a section contains more than one algorithm. <i>n</i> is ordinal number of the algorithm within the section.<br /><i>algorithmStepNumber</i>: is the step number within the algorithm that the rest relates to. It is excluded for tests that relate to non-algorithmic sections of the specification.<br /><i>testNumber</i>: is present if there is more than one testcase for a particular algorithm step or non-algorithm specification section.<br />-s: is an optional suffix -s that identifies that the test is only applies to strict mode<br />x: is an optional suffix that identifies that the test intentionally contains something that should case a syntax error. Such tests are expected to not load correctly and if they do it load it is a test failure. The test function should not return true.<br />
<h3>Test File Structure</h3>
<hr />
Each testcase must be a single .js file.<br />A testcase is made up of the following parts (1) license header (2) test registration call (3) test case object literal and looks like:<br /><pre>
/// Copyright (c) &lt;&lt;year&gt;&gt; &lt;&lt;copyright owner&gt;&gt;.
///
/// 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 &lt;&lt;copyright owner&gt;&gt; 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 &amp;quot;AS IS&amp;quot; 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.
/* be sure to put your personal &lt;&lt;year&gt;&gt; and &lt;&lt;copyright owner&gt;&gt; information into the above header */
ES5Harness.registerTest( {
id: &quot;sectionNumber[@nnn][-algorithmStepNumber]-testNumber[-s]&quot;, //put a unique test id here
path: &quot;TestCases/testTemplate.js&quot;, //the directory path of this test starting at TestCases
description: 'Insert text descripting the test here',
test: function testcase() {
//Add test code here, return true if test passes
}
precondition: function precond() {
//Add code to test any preconditions that must be establish in order to run this test.
//Return true if it is ok to run the test.
//This property may be completely omitted in which case the test will always be run.
return true;
}
});
</pre><br />The license header is the copyright notice and New BSD license text. <br />Be sure to fill in the actual year and name of the copyright holder.<br /><br />The test registration is a JavaScript function call of the form:<br /><pre>
ES5Harness.registerTest( testObject);
</pre> <b>ES5Harness</b> is the global name of the test harness and <b>registerTest</b> is the method that is used to register tests. <br />The argument is an object that defines an individual test. Normally the argument <i>testObject</i>is an object literal. <br /><br />A test case object has the following properties:
<ul><li><b>id</b>: A string containing the name of this test file using the above naming conventions. The file extension is not included in the id.</li>
<li><b>path</b>: A string containing the relative directory path of this test starting at TestCases.</li>
<li><b>description</b>: A string describing the purpose of this test.&amp;nbsp; It is used to generate test reports.</li>
<li><b>test</b>: A function that performs the actual test. The test harness will call this function to execute the test.&amp;nbsp; It must return true if the test passes. Any other return value indicates a failed test. The test function is called as a method with its this value set to its defining test case object.</li>
<li><b>precondition</b>: (Optional) A function that is called before the test function to see if it is ok to run the test.&amp;nbsp; If all preconditions necessary to run the test are established it should return true. If it returns , the test will not be run.&amp;nbsp; The precondition function is called as a method with its this value set to its defining test case object. This property is optional. If it is not present, the test function will always be executed.</li></ul>
<br />A text case object may also define other properties. The test case file may also contain additional global code and declarations. However, this is not recommended unless necessary for creating a test relating to global access. <br /><br /></div>allenwbSun, 28 Jun 2009 00:22:37 GMTUpdated Wiki: testOrg 20090628122237A