js/src/tests/README.txt

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/js/src/tests/README.txt	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,54 @@
     1.4 +JS Test Suite Readme
     1.5 +====================
     1.6 +
     1.7 +The JS test suite is a fairly extensive collection of correctness and regression
     1.8 +tests for the Spidermonkey engine. Two harnesses run these tests: the shell test
     1.9 +harness in this directory and the "reftest" harness built into the browser, used
    1.10 +by Tinderbox. The browser reftests require additional manifest files; these are
    1.11 +generated automatically by the build phase 'package-tests' using the
    1.12 +'--make-manifests' option to jstests.py.
    1.13 +
    1.14 +Creating a test
    1.15 +---------------
    1.16 +For general information, see
    1.17 +https://developer.mozilla.org/en-US/docs/SpiderMonkey/Creating_JavaScript_tests
    1.18 +
    1.19 +Adding a test
    1.20 +-------------
    1.21 +    Drop it in an appropriate directory under the tests directory.
    1.22 +
    1.23 +        <fineprint> Some names are forbidden. Do not name your test browser.js,
    1.24 +        shell.js, jsref.js, template.js, user.js, js-test-driver-begin.js, or
    1.25 +        js-test-driver-end.js, or any of the names of the files in supporting/.
    1.26 +        </fineprint>
    1.27 +
    1.28 +Adjusting when and how a test runs
    1.29 +----------------------------------
    1.30 +    Put a comment at the top of the header matching the format:
    1.31 +        // |reftest| <failure-type> -- <comment>
    1.32 +
    1.33 +    Where <failure-type> is a standard reftest <failure-type> string, as documented by:
    1.34 +        http://mxr.mozilla.org/mozilla-central/source/layout/tools/reftest/README.txt
    1.35 +
    1.36 +    Example:
    1.37 +        // |reftest| skip-if(!xulRuntime.shell) -- does not always dismiss alert
    1.38 +
    1.39 +        <fineprint> Either // or /* */ style comments may be used. The entire
    1.40 +        comment must appear in the first 512 bytes of the file. The control
    1.41 +        string must be in its own comment block. </fineprint>
    1.42 +
    1.43 +    When adding such comments to individual files is not feasible (e.g., for
    1.44 +    imported tests), reftest manifest entries can be added to jstests.list
    1.45 +    instead. Combining in-file comments with entries in this manifest file for
    1.46 +    the same files is not supported (the one from the manifest file will be
    1.47 +    used). Only the following two forms are supported:
    1.48 +        <failure-type> include <relative_path>
    1.49 +        <failure-type> script <relative_path>
    1.50 +    The <type> "include" indicates that <failure-type> should apply to all test
    1.51 +    cases within a directory. A statement for a nested directory or script
    1.52 +    overrides one for an enclosing directory.
    1.53 +
    1.54 +Running tests
    1.55 +-------------
    1.56 +See
    1.57 +https://developer.mozilla.org/en-US/docs/SpiderMonkey/Running_Automated_JavaScript_Tests

mercurial