Commit Graph

491 Commits

Author SHA1 Message Date
Brian Terlson 83b07ff15e Merge pull request #132 from bterlson/rename
Clean up ./test directory
2014-12-09 13:44:08 -08:00
Brian Terlson 47821a8bd0 Update python scripts for new paths 2014-12-07 15:42:12 -08:00
Brian Terlson 2a74f0ec1b Reorganize ./test 2014-12-07 15:33:09 -08:00
Brian Terlson da465e7399 Move S9.9_A1/2 to proper locations
The with statement tests were novel, but the tests for
property accessors throwing errors for undefined & null
were duplicates with S11.2.1_A3_T4/5 respectively.
2014-12-07 15:31:49 -08:00
Brian Terlson bf9830ee54 Merge pull request #131 from domenic/assert-throws
Add assert.throws
2014-12-05 12:35:08 -08:00
Domenic Denicola 66a39c0423 Add an example of using assert.throws 2014-12-05 14:41:06 -05:00
Domenic Denicola fa4c337570 Add assert.throws
Closes #57.
2014-12-05 14:41:04 -05:00
Brian Terlson 3883a2e906 Merge pull request #127 from smikes/asserts
add "assert.js" to python, website runners too
2014-12-01 20:14:47 -08:00
Brian Terlson 3b49ec5108 Merge pull request #124 from domenic/asserts
Initial assert helpers
2014-12-01 19:53:51 -08:00
smikes e0fdc30078 add "assert.js" to python, website runners too 2014-12-01 20:04:35 -07:00
Brian Terlson b53ba9f9c8 Merge pull request #123 from domenic/whitespace-fixes
Whitespace fixes
2014-12-01 13:04:42 -08:00
Domenic Denicola 0d94ef1e98 Example of using assert.js 2014-12-01 16:04:33 -05:00
Domenic Denicola 2a01b54bb4 Fix whitespace for async test detection
Presumably since Python is whitespace-sensitive, this is actually quite important?
2014-12-01 15:53:27 -05:00
Domenic Denicola dd243a757c Remove trailing whitespace from the Python 2014-12-01 15:52:19 -05:00
Domenic Denicola 4bb8c027e4 Add initial assert helpers
Closes #110
2014-12-01 15:44:33 -05:00
Brian Terlson bbeafbd3c6 Remove "best practice" tests
Sbp_A1_T1 to Sbp_A5_T2, Sbp_12, Sbp_7*: Functions are now valid in blocks, tests syntactically invalid anyway
Sbp_A10_T1 to Sbp_A10_T2: Tests are broken
2014-11-19 15:28:04 -08:00
Brian Terlson b752d2fdde Merge pull request #117 from smikes/issue-80/obsolete-frontmatter
remove obsolete attributes from frontmatter fixes #80
2014-11-12 12:26:05 -08:00
Brian Terlson 0149045593 Merge pull request #86 from smikes/pr/83
browser runner: check negative regex
2014-11-12 12:25:05 -08:00
smikes 2d62a6df1f remove email attribute
remove spec attribute
remove assertion, section, name
2014-11-12 13:16:42 -07:00
Brian Terlson 0caf4eec31 Merge pull request #100 from smikes/promise-tests
add initial set of tests for Promise
2014-11-12 11:29:11 -08:00
André Bargull 5c5dffce8b es6 compatability updates
See also: https://github.com/tc39/test262/pull/29
2014-11-11 17:34:23 -08:00
Brian Terlson c3a803b4a3 Merge pull request #115 from smikes/issue-114-logname
test262.py crashes when --logfile due to reference to absent attribute 'logfile'
2014-11-11 17:23:10 -08:00
smikes 64093f79d3 add some unit tests
add test to repro #114
fix issue #114
factor out PercentFormat function
new fn write; start factoring summary output
fix tests to match
consolidate "Failed Tests" message
add test for successful run
consolidate all_succeeded message
consolidate summary line
consolidate ntests
failing negative tests
squeeze whitespace
2014-11-11 17:07:48 -07:00
smikes f544773583 split "expectedThis" cases into strict/nonstrict branches 2014-11-10 19:21:54 -07:00
smikes 26787ab09b add tests for 24.4.4.1 - Promise.all
add more tests of Promise.all

additional Promise test

add tests of Promise.prototype

add some tests for Promise.race

additional Promise tests

add Promise.reject and Promise.resolve tests

correct test description

rename badly-named files

use current license and minor style cleanup

correct understanding of undefined as thisArgument

incorporate line notes

Is this enough to make a constructor in ES6?

more accurate use of resolved,fulfilled etc.
remove some redundant tests
add new tests

remove "constant array" unclear language

better description

Update S25.4.2.1_A3.2_T1.js

address dangling ()

changes per @anba line notes
 - if GetIterator is abrupt, the Promise.race / Promise.all should reject
 - if Promise.race is called with nonconforming constructor as 'this',
   TypeError should be thrown (cannot reject if exeption is thrown from
   NewPromiseCapability; no promise exists yet...)

correct description of "this" testing in callbacks

fix whitespace, formatting

remove tab
add "next-turn" checking to sequencers
2014-11-10 16:37:36 -07:00
Brian Terlson 61113dbfb3 Merge pull request #36 from mmalecki/target-blank
Use `target='_blank'` to open links in new window
2014-10-24 15:30:01 -07:00
Brian Terlson 1f2812adeb Merge pull request #104 from smikes/monkeyYaml-loadfix
load monkeyYaml without assuming it is on path
2014-10-24 14:41:40 -07:00
Sam Mikes 9dc29da897 load monkeyYaml without assuming it is on path
use imp to import monkeyYaml locally
make monkeyYaml the backup again
2014-10-24 22:36:03 +01:00
Brian Terlson eb08d871c5 Merge pull request #69 from smikes/ES5-Array-concat-ownProperty
ES5.S15: new tests to clarify Array.prototype.concat
2014-10-24 10:48:00 -07:00
Brian Terlson 0c0d1d3d46 Merge pull request #101 from smikes/addl-console-negative-fixes
additional fixes suggested by @anba
2014-10-24 10:31:39 -07:00
Brian Terlson a754f2c4ea Merge pull request #102 from smikes/issue-75-spurious-path-in-flags
remove spurious flags: [path]
2014-10-24 10:30:48 -07:00
Sam Mikes 5fbb0a3902 remove spurious flags: [path] 2014-10-24 15:24:57 +01:00
Sam Mikes 89d71f56b2 additional fixes suggested by @anba 2014-10-24 15:18:37 +01:00
Brian Terlson e2b675f443 Merge pull request #90 from smikes/monkeyYaml
provide fallback parser if YAML not installed
2014-10-14 19:05:26 -07:00
Sam Mikes 4f9cec2fa8 provide fallback parser if YAML not installed
parseTestRecord.py:
- recover from ImportError when YAML not defined
- use monkeyYaml as backup

monkeyYaml.py:
- parser for subset of YAML used in test262 frontmatter

test_monkeyYaml.py:
- unit tests
2014-08-28 12:47:58 +01:00
Brian Terlson 9bd668692e Merge pull request #89 from smikes/CONTRIBUTING-document-timeout
document `timeout` and clean up
2014-08-25 09:16:00 -07:00
Sam Mikes 5b8879b951 document `timeout` and clean up
CONTRIBUTING.md
- document `timeout` tag
- reorder tags in frontmatter doc
- minor cleanups
- minor fixes
- add style note
- reformat flags
- remove discussion of obsolete $INCLUDE
- incorporate line notes from @domenic
- integrate additional comments
- add links back, move arg notes down
- Raise outline level by one

README.md
- link to CONTRIBUTING
2014-08-25 17:00:15 +01:00
Sam Mikes c650b1a9b0 ES5.S15: new tests to clarify Array.concat
Test of spec language from 15.4.4.4,
5.b.iii.3.b states 'Call the [[DefineOwnProeprty]] internal method of A'
which means that the result of Array.prototype.concat
should return `true` from `hasOwnProperty` for every property
created by `concat`, up to `length`

Set length to 3.
a[0] is set to 0 on a
a[1] is unset
a[2] is set to 2 via a prototype of a

add assertions for values of b[0], b[1], b[2]
add assertions for b.hasOwnProperty('2')

Check with Array.prototype and Object.prototype, separate tests

fix typo in assertion message

test was correct, but assertion message was incorrect
2014-08-19 22:01:46 +01:00
Sam Mikes 4debe08707 browser runner: check negative regex
1. use negative regex (instead of ".") to check iframeError
2. make Test262Error.prototype.toString() always include
   the string Test262Error (no spaces) so it matches /Test262Error/
3. modify check for supportsWindowOnerror - require that
   first argument (message) to onerror() contains the error name
   by checking for /Error:/.

Change (3) above forces IE11 onto the !supportsWindowOnerror path.
Test262 tests are run inside an eval() on IE11, and errors are
caught and explicitly have toString() called.  Without this,
IE11 passes only the `message` property to onerror(), and regexes
that expect to match error name fail.

sth: revert to simple `onerror` checking

gs: refactor function `$DONE`

refactor logic tree
add support for async test failures

ed.js: crude support for error typing

S8.7.1_A2: cache result of delete

`delete` has a side-effect and its
return value depends on this; cache result of
delete so when reporting result, we are always
reporting the result that made us fail, not the
result of a new delete
[pedantic]

ed: explicitly pass cooked error to $DONE

gs: only let $DONE be called once
2014-08-13 12:24:12 +01:00
Brian Terlson 595a36b252 Merge pull request #67 from smikes/negative-addErrorName-bestPractice
Remove negative flag from test bed. Replace with specific errors. Other misc. fixes.
2014-08-12 16:39:14 -07:00
Sam Mikes 6b7e5d7747 bestPractice: supply error names to negative
pilot directory for replacing flags: [negative] with
negative: errorname

ch07-7.2,7.3: add error names
ch07-rest: insert error names rest of ch07
ch08: add expected error name
ch11: add error name to negative
ch12: put error name in negative

ch13: add error name to negative
only one test, did it manually

ch15: add error name to negative:

ch07: add error name to negative

these tests used flags: \n - negative and so
were not caught by the earlier naive grep for flags: [negative]

--- changes suggested by @anba

bestPractice - remove added NotEarlyError
ch07,ch11 - expect ReferenceError (req'd by ES6)
correct test descriptions to expect ReferenceError only
enforce parsing as block statement by adding `;`
remove needless include of $FAIL.js

effectively, a rebase of all changes onto master

    Merge branch 'negative-addErrorName-work' into negative-addErrorName-bestPractice

    Merge branch 'saved-bestPractice-negative' into negative-addErrorName-work

    Conflicts:
    	test/suite/ch11/11.13/11.13.2/S11.13.2_A2.2_T2.js
    	test/suite/ch12/12.1/S12.1_A4_T1.js
    	test/suite/ch12/12.5/S12.5_A2.js

    incorporate changes made on PR branch

    re-remove added NotEarlyError

    Merge branch 'negative-addErrorName-work' into negative-addErrorName-bestPractice

    Conflicts:
    	test/suite/ch11/11.13/11.13.2/S11.13.2_A2.2_T2.js
    	test/suite/ch12/12.1/S12.1_A4_T1.js
    	test/suite/ch12/12.5/S12.5_A2.js

    ch15: correct negative regexes

    ch10: avoid use of not-NotEarlyError regex

    ch14 error regexps

    ch13 error regexps

    ch12: negative error matching

    Merge branch 'console-runner-checkError' into negative-addErrorName-work

    test262.py: check negative tests with regex

    implement checking of negative tests =>

    negative: SyntaxError

    means that /SyntaxError/ must match stderr
    or test is reported as failure

    Fixes #78

    expect real errors

    bestPractice: supply error names to negative

    pilot directory for replacing flags: [negative] with
    negative: errorname

    ch07-7.2,7.3: add error names
    ch07-rest: insert error names rest of ch07
    ch08: add expected error name
    ch11: add error name to negative
    ch12: put error name in negative

    ch13: add error name to negative
    only one test, did it manually

    ch15: add error name to negative:

    ch07: add error name to negative

    these tests used flags: \n - negative and so
    were not caught by the earlier naive grep for flags: [negative]

    --- changes suggested by @anba

    bestPractice - remove added NotEarlyError
    ch07,ch11 - expect ReferenceError (req'd by ES6)
    correct test descriptions to expect ReferenceError only
    enforce parsing as block statement by adding `;`
    remove needless include of $FAIL.js

    Merge branch 'negative-addErrorName-work' into negative-addErrorName-bestPractice

    resolved Conflicts:
    	test/suite/ch07/7.9/S7.9_A5.7_T1.js
    	test/suite/ch11/11.13/11.13.1/S11.13.1_A2.1_T3.js
    	test/suite/ch11/11.13/11.13.2/S11.13.2_A2.2_T1.js
    	test/suite/ch11/11.13/11.13.2/S11.13.2_A2.2_T10.js
    	test/suite/ch11/11.13/11.13.2/S11.13.2_A2.2_T11.js
    	test/suite/ch11/11.13/11.13.2/S11.13.2_A2.2_T2.js
    	test/suite/ch11/11.13/11.13.2/S11.13.2_A2.2_T3.js
    	test/suite/ch11/11.13/11.13.2/S11.13.2_A2.2_T4.js
    	test/suite/ch11/11.13/11.13.2/S11.13.2_A2.2_T5.js
    	test/suite/ch11/11.13/11.13.2/S11.13.2_A2.2_T6.js
    	test/suite/ch11/11.13/11.13.2/S11.13.2_A2.2_T7.js
    	test/suite/ch11/11.13/11.13.2/S11.13.2_A2.2_T8.js
    	test/suite/ch11/11.13/11.13.2/S11.13.2_A2.2_T9.js
    	test/suite/ch11/11.3/11.3.1/S11.3.1_A2.1_T3.js
    	test/suite/ch11/11.3/11.3.2/S11.3.2_A2.1_T3.js
    	test/suite/ch11/11.4/11.4.4/S11.4.4_A2.1_T3.js
    	test/suite/ch11/11.4/11.4.5/S11.4.5_A2.1_T3.js
    	test/suite/ch12/12.5/S12.5_A2.js
    	test/suite/ch12/12.6/12.6.3/S12.6.3_A4_T2.js

    negative: second half of @anba notes

    correct test descriptions to expect ReferenceError only
    enforce parse as block statement by adding `;`
    remove needless include of $FAIL.js

    ch12: specify type

    negative: @anba fixes

    bestPractice - remove added NotEarlyError
    ch07,ch11 - expect ReferenceError (req'd by ES6)

    bestPractice: supply error names to negative

    pilot directory for replacing flags: [negative] with
    negative: errorname

    ch07-7.2,7.3: add error names
    ch07-rest: insert error names rest of ch07
    ch08: add expected error name
    ch11: add error name to negative
    ch12: put error name in negative

    ch13: add error name to negative
    only one test, did it manually

    ch15: add error name to negative:

    ch07: add error name to negative

    these tests used flags: \n - negative and so
    were not caught by the earlier naive grep for flags: [negative]

    expect a SyntaxError

    ch07: add error name to negative

    these tests used flags: \n - negative and so
    were not caught by the earlier naive grep for flags: [negative]

    ch15: add error name to negative:

    ch13: add error name to negative

    only one test, did it manually

    ch12: put error name in negative

    ch11: add error name to negative

    ch08: add expected error name
    ch07-rest: insert error names rest of ch07

    ch07-7.2,7.3: add error names

    negative-errorname: pilot

    pilot directory for replacing flags: [negative] with
    negative: errorname

    bestPractice: supply error names to negative

bestPractice: supply error names to negative

pilot directory for replacing flags: [negative] with
negative: errorname

ch07-7.2,7.3: add error names
ch07-rest: insert error names rest of ch07
ch08: add expected error name
ch11: add error name to negative
ch12: put error name in negative

ch13: add error name to negative
only one test, did it manually

ch15: add error name to negative:

ch07: add error name to negative

these tests used flags: \n - negative and so
were not caught by the earlier naive grep for flags: [negative]

bestPractice: supply error names to negative

negative-errorname: pilot

pilot directory for replacing flags: [negative] with
negative: errorname

ch07-7.2,7.3: add error names

ch07-rest: insert error names rest of ch07

ch08: add expected error name

ch11: add error name to negative

ch12: put error name in negative

ch13: add error name to negative

only one test, did it manually

ch15: add error name to negative:

ch07: add error name to negative

these tests used flags: \n - negative and so
were not caught by the earlier naive grep for flags: [negative]

expect a SyntaxError

negative: @anba fixes

bestPractice - remove added NotEarlyError
ch07,ch11 - expect ReferenceError (req'd by ES6)

ch12: specify type

negative: second half of @anba notes

correct test descriptions to expect ReferenceError only
enforce parse as block statement by adding `;`
remove needless include of $FAIL.js

expect real errors

ch12: negative error matching

ch13 error regexps

ch14 error regexps

add "description" header back

remove now-unused includes

remove needless include
2014-08-13 00:19:11 +01:00
Brian Terlson a794e0eb54 Merge pull request #76 from anba/issue-61/wrong-test-assertions
Correct test assertion (Fixes issue#61)
2014-08-05 23:52:06 -07:00
Brian Terlson 7f5310b4d5 Merge pull request #77 from anba/issue-63/correct-array-fill-test
Correct Array.prototype.fill tests (Fixes #63)
2014-08-05 23:51:28 -07:00
Brian Terlson f04573e583 Merge pull request #79 from anba/issue-41/move-clz-to-math
Move tests to Math.clz32 (Fixes #41)
2014-08-05 23:50:05 -07:00
André Bargull f0ac90a5fd Move tests to Math.clz32 (Fixes #41)
Number.prototype.clz() was renamed to Math.clz32(). Also removed superfluous 'spec' entry in test descriptor.
2014-08-04 20:57:02 +02:00
André Bargull e256a76e9d Correct Array.prototype.fill tests (Fixes #63)
The expected results weren't correct.
2014-08-04 19:44:22 +02:00
André Bargull 28649e8772 Correct test assertion (Fixes issue#61)
Changed Number.isNaN_Boolean.js, String.prototype.endsWith_Fail.js and String.prototype.endsWith_Fail_2.js to test for the correct result. Also removed implicit coercion in a couple of other test files.
2014-08-04 19:10:41 +02:00
Brian Terlson 64756c252e Merge pull request #68 from smikes/remove-unused-harness
harness: remove unused code
2014-08-02 20:40:40 -07:00
Sam Mikes 4205a1da64 harness: remove unused code
sta.js:
slight change to Test262Error() semantics; message property now always set (default "")
make $ERROR a var
set $ERROR to function $ERROR so it can be overridden if needed
remove 2009 copyright in favor of 2012 copyright
REVERTED: remove never-used fn testFailed
testFailed actually used by $FAIL
remove obsolete fn $INCLUDE

ed.js:
remove commented-out obsolete code

test262.py:
remove always-included harness file that provides no functions used by any extant test
add comment line to nonstrict

cth.js: define `print` for node, cscript

use cth (console test harness) to define functions
for console runner.  V8, Spidermonkey (js) and JavaScriptCore (jsc)
provide a function `print`.  Provide a default `print` for node
and cscript

set print_handle to 'print' by default (can still override)
for cscript: wrap tests in try/catch so we get syntax errors
2014-08-03 00:33:08 +01:00
Brian Terlson 479a6dd442 Merge pull request #66 from smikes/Math-isNaN
es6/Math: use Number.isNaN
2014-07-31 15:31:42 -07:00