js/src/tests/README.txt

changeset 0
6474c204b198
equal deleted inserted replaced
-1:000000000000 0:8cc14646715b
1 JS Test Suite Readme
2 ====================
3
4 The JS test suite is a fairly extensive collection of correctness and regression
5 tests for the Spidermonkey engine. Two harnesses run these tests: the shell test
6 harness in this directory and the "reftest" harness built into the browser, used
7 by Tinderbox. The browser reftests require additional manifest files; these are
8 generated automatically by the build phase 'package-tests' using the
9 '--make-manifests' option to jstests.py.
10
11 Creating a test
12 ---------------
13 For general information, see
14 https://developer.mozilla.org/en-US/docs/SpiderMonkey/Creating_JavaScript_tests
15
16 Adding a test
17 -------------
18 Drop it in an appropriate directory under the tests directory.
19
20 <fineprint> Some names are forbidden. Do not name your test browser.js,
21 shell.js, jsref.js, template.js, user.js, js-test-driver-begin.js, or
22 js-test-driver-end.js, or any of the names of the files in supporting/.
23 </fineprint>
24
25 Adjusting when and how a test runs
26 ----------------------------------
27 Put a comment at the top of the header matching the format:
28 // |reftest| <failure-type> -- <comment>
29
30 Where <failure-type> is a standard reftest <failure-type> string, as documented by:
31 http://mxr.mozilla.org/mozilla-central/source/layout/tools/reftest/README.txt
32
33 Example:
34 // |reftest| skip-if(!xulRuntime.shell) -- does not always dismiss alert
35
36 <fineprint> Either // or /* */ style comments may be used. The entire
37 comment must appear in the first 512 bytes of the file. The control
38 string must be in its own comment block. </fineprint>
39
40 When adding such comments to individual files is not feasible (e.g., for
41 imported tests), reftest manifest entries can be added to jstests.list
42 instead. Combining in-file comments with entries in this manifest file for
43 the same files is not supported (the one from the manifest file will be
44 used). Only the following two forms are supported:
45 <failure-type> include <relative_path>
46 <failure-type> script <relative_path>
47 The <type> "include" indicates that <failure-type> should apply to all test
48 cases within a directory. A statement for a nested directory or script
49 overrides one for an enclosing directory.
50
51 Running tests
52 -------------
53 See
54 https://developer.mozilla.org/en-US/docs/SpiderMonkey/Running_Automated_JavaScript_Tests

mercurial