Commit Graph

6 Commits

Author SHA1 Message Date
Brian Terlson 7992be11ed Merge pull request #386 from anba/issue-383/test-failures
Fix test regressions
2015-07-17 13:06:38 -07:00
André Bargull a85f5039e0 Remove links to hg.ecmascript.org 2015-07-17 17:43:09 +02:00
André Bargull 85b248844d Fix test regressions
- Add missing 'negative: ReferenceError' in S7.9_A5.7_T1
- Remove stale 'negative: ReferenceError' in block-local-closure-get-before-initialization
- Remove all tail-call expressions in test/built-ins/Function
- And update code in test/built-ins/Function to simply use 'f()' instead of 'var r = f(); return r'

Fixes #383
2015-07-17 17:31:26 +02:00
Mike Pennisi 10e0d977ec Prefer explicit error checking where possible
The `negative` frontmatter tag expresses an expectation for the behavior
of the test file as a whole. The `assert.throws` helper function offers
more fine-grained control over expectations because it may be applied to
specific statements and expressions. This makes it preferable in cases
where it may be used (i.e. when the test body does not describe a syntax
error or early error).

Re-implement assertions for errors to use the `assert.throws` helper
function wherever possible.
2015-07-10 14:12:57 -04:00
Mike Pennisi 29ecced632 Update handling of directive prologues
Some tests specifically concern the application of the `use strict`
directive as it appears in JavaScript source code. These tests should
*not* be run with the `onlyStrict` flag because relying on the test
runner to enable strict mode makes the semantics of the source code
irrelevant. Update these tests to use the `noStrict` flag.

Other tests concern language semantics that are only valid in strict
mode, but the mechanism for enabling strictness is inconseqential.
Update these tests to use the `onlyStrict` flag and remove any redundant
`use strict` directive prologues contained within.

Still other tests are valid both within and outside of strict mode.
In keeping with the majority of other tests, do not specify any
restrictions on the environments in which these tests may be run.
2015-06-18 17:38:34 -04:00
Brian Terlson 2a74f0ec1b Reorganize ./test 2014-12-07 15:33:09 -08:00