Commit Graph

641 Commits

Author SHA1 Message Date
Brian Terlson 2230f90e06 Merge pull request #59 from smikes/CONTRIBUTING-clarify
CONTRIBUTING: more notes on test writing
2014-07-31 15:30:16 -07:00
smikes 240635c99a CONTRIBUTING.md: minor fixes
Minor fixes: typos, formatting, verb tense&agreement
Add example of short-list `includes: []` and long-list `includes: \n - \n -`
2014-07-31 14:41:08 -06:00
Sam Mikes bd80bf7dfc es6/Math: use Number.isNaN
use number.isNaN to test for NaN
pointed out by @anba in #60
2014-07-31 13:53:12 -06:00
Sam Mikes 23ef85c9a7 CONTRIBUTING: more notes on test writing
Add section on test environment
Add section on custom helpers
describe YAML frontmatter
Fix minor formatting errors
document $INCLUDE as obsolete
Change documentation of negative error
Move test environment and custom helpers down
indent copyright and frontmatter sections
better description of the async calls between a promise
and the functions in its `.then`
Correct Early Error example: don't throw a string

CONSOLE-RUNNER: split runner doc into new file
add troubleshooting section
2014-07-31 20:17:15 +01:00
Brian Terlson 413e16e355 Merge pull request #51 from bterlson/normalize-format
Normalize testcase format
2014-07-30 15:50:14 -07:00
Sam Mikes c33bf0e043 tools, harness: support new YAML frontmatter
parseTestRecord: add support for YAML frontmatter
parseTestRecord: initial unit test for test record parser
parseTestRecord: refactor for testing

factor old parsing; add YAML parsing

runner: support "includes" from YAML frontmatter

support frontmatter "includes" in python runner
use test.includes if present instead of scanning test code with regex

harness: factor individual functions out into files

tools: handle YAML errors

tolerate missing keys in dictionary (flags, includes)
report filename when empty frontmatter block
new option --list-includes to test262.py

harness: factor helper functions into separate files

sth: remove extra close-paren (syntax error)

test_common: TDD; failing parse of YAML

common: use parseTestRecord (YAML-aware)
2014-07-30 15:39:04 -07:00
Brian Terlson 0defa37385 Add path attribute. 2014-07-30 15:39:01 -07:00
Brian Terlson d4354d14d5 Normalize testcase format
This commit normalizes the test case format used across test262. It applies the following transformations:

* Convert to YAML for frontmatter
* Remove of trailing whitespace
* Replace /r/n with /n except in chapters 6 and 7.
* Copyright header always uses // comments
* new includes attribute replaces $INCLUDE
* No implicit assumptions about test environment other than $ERROR. Everything else appears in the include array. This includes "runTestCase" which is now included in a substantial number of tests.
2014-07-30 15:38:26 -07:00
Brian Terlson 07ccd199d9 Merge pull request #65 from mathiasbynens/patch-1
Delete `Number.toInteger` test
2014-07-30 14:24:35 -07:00
Mathias Bynens a824f44727 Delete `Number.toInteger` test
`Number.toInteger` was removed from the ES6 draft. Fixes #62.
2014-07-30 23:17:00 +02:00
Brian Terlson 509472bb74 Fix suspect formatting in S15.2.3.1_A3 2014-07-24 15:29:21 -07:00
Brian Terlson fcba15ff11 Merge pull request #53 from smikes/CONTRIBUTING-async-printhandles
CONTRIBUTING: add notes on async
2014-07-23 17:21:07 -07:00
smikes 99706a2786 CONTRIBUTING: add notes on async
add a table showing which print handle to use when
running async tests through test262.py runner

@anba contributed information about async tests in
SpiderMonkey and JavaScriptCore
2014-07-23 21:55:16 +01:00
Brian Terlson dd821f2700 Merge pull request #52 from smikes/syntax-error-isAsyncTest-sth
sth: correct syntax error in new fn isAsyncTest
2014-07-22 17:33:02 -07:00
smikes a8c49d8b47 sth: correct syntax error in new fn isAsyncTest 2014-07-22 10:41:32 -06:00
Brian Terlson 66aab6025d Fix comment formatting for S22.1.2.3_T1.js 2014-07-21 15:47:50 -07:00
Brian Terlson 66366d6961 Merge pull request #49 from smikes/faster-python-runner
test262.py: only include helper scripts when needed
2014-07-21 14:32:03 -07:00
Brian Terlson 1cbf603a2d Merge pull request #50 from smikes/additional-CONTRIBUTING-notes
CONTRIBUTING: document test262.py, async tests
2014-07-21 13:16:29 -07:00
Sam Mikes d180b84e01 CONTRIBUTING: document test262.py, async tests
add a section on requirements for using console test runner test262.py

add a section on asynchronous tests

add subsection to authoring guidelines with suggestion for test names
2014-07-21 10:19:06 -06:00
Sam Mikes d4a3479a1e test262.py: only include helper scripts when needed
test262.py: only supply async helper scripts when test is async
sth.js: factor out function isAsyncTest()
timer.js: improve workaround for async tests when Promise is defined but setTimeout is noot

timer.js emulates setTimeout using Promise by doing a busy loop that checks
if `timeout` milliseconds have elapsed.  Modified check to (timeLeft > 0) instead
of (!timeLeft) to prevent infinite loop when check does not happen to run
at precise millisecond timeout expires.

Because test262.py did not support the $INCLUDE directive, some helper
scripts were added to every test -- notably testIntl, timer, and donePrintHandle
Now that $INCLUDE is supported, these can be dropped, speeding overall test run time
2014-07-21 15:15:04 +01:00
Brian Terlson e09d62bba3 Merge pull request #17 from hankyates/array-fill-tests
* hankyates/array-fill-tests:
  Adding Array.prototype#fill tests
2014-07-18 15:20:03 -07:00
Hank Yates cae283b563 Adding Array.prototype#fill tests 2014-07-18 15:17:33 -07:00
Brian Terlson 33c8399de8 Merge pull request #31 from Constellation/fix-error-code
Propagate error code when test cases are failed
2014-07-18 11:38:31 -07:00
Brian Terlson 96c6efe0ef Merge pull request #43 from smikes/initial-Promise-tests
Initial promise tests
2014-07-18 11:22:48 -07:00
Brian Terlson 821e06e3f1 Merge pull request #44 from smikes/fix-packager
packager: make packager runnable
2014-07-18 11:21:52 -07:00
smikes 7032af4db8 packager: make packager runnable
packager.py cannot run due to syntax errors in a few script files

packagerConfig: use git instead of hg
test262: use pop instead of delete to avoid throw if property missing
S22.1.2.1_T*: fix docString header comment: s/b /**
S22.1.2.1_T3: fix docString header comment: s/b /**, fix end of docstring * / => */
2014-07-18 08:53:29 +01:00
Sam Mikes 7e07cc138d async,promises: initial tests of Promises
doneprintHandle.js: make $DONE accept any falsy argument as meaning 'pass'
PromiseHelper.js: checkSequence: new helper fn for async tests
.gitignore: port .hgignore to .gitignore syntax
test262.py: support $INCLUDE directive in python test runner

S25.4.4.1*: tests to cover Section 25.4.4.1, Promise.all( iterable )
A1.1: Promise.all is callable
A1.2: Promise.all expects 1 argument
A2.1: Promise.all([]) is a Promise
A2.2: Promise.all([]) is resolved immediately
A2.3: Promise.all([]) is resolved with a new empty array
A3.1: Promise.all expects an iterable argument
2014-07-18 05:37:08 +01:00
Brian Terlson 0efbedeaa1 Merge pull request #20 from mgmeyers/Array.prototype.find
* mgmeyers/Array.prototype.find:
  Adds tests for Array.prototype.find
2014-07-17 11:28:15 -07:00
Matthew Meyers c451a33299 Adds tests for Array.prototype.find 2014-07-17 11:24:50 -07:00
Brian Terlson 880a7e9316 Merge pull request #12 from ryanmurakami/es6Tests
* es6Tests:
  first batch of ES6 tests
2014-07-16 17:34:23 -07:00
ryanmurakami eb0ff48938 first batch of ES6 tests 2014-07-16 17:31:37 -07:00
Brian Terlson 382b844b23 Merge pull request #11 from hankyates/array-of-tests
* hankyates/array-of-tests:
  Adding Array#of tests
2014-07-16 17:15:19 -07:00
Hank Yates 9244107ebf Adding Array#of tests 2014-07-16 17:03:52 -07:00
Brian Terlson e30c0b3183 Remove external folder 2014-07-16 13:59:52 -07:00
Brian Terlson 5278df4721 Merge pull request #5 from hankyates/array-from-tests
* array-from-tests:
  Adding test for Array.from
2014-07-16 13:51:19 -07:00
Hank Yates 7edb891fff Adding test for Array.from 2014-07-16 13:34:37 -07:00
Brian Terlson 262ce4d0d8 Merge pull request #9 from tdahlstrom/bug_596
* tdahlstrom/bug_596:
  Bug 596 - Coverage: 15.4.4.11 - identical elements and array holes
2014-07-16 12:58:54 -07:00
Thomas Dahlstrom 2f5ec53aad Bug 596 - Coverage: 15.4.4.11 - identical elements and array holes 2014-07-16 12:56:46 -07:00
Brian Terlson 50696f69f6 Merge pull request #34 from niksurya/master
Adding Support for Async Tests
2014-07-16 12:10:56 -07:00
NikSurya 9aa6b917fa Adding Support for Async Tests 2014-07-15 13:47:59 -07:00
Brian Terlson b0c6fb0272 Merge pull request #2 from bterlson/localeCompare-fix
15.5.4.9_CE should check for locale-sensitive comparison
2014-07-10 14:59:57 -07:00
Brian Terlson e7f4a5c395 Merge pull request #38 from muratsu/guideline
Add contributing.md and update readme.md
2014-07-10 14:58:48 -07:00
Brian Terlson 916a08bb9a Merge pull request #19 from JaimeLynSchatz/JaimeLynSchatz/fixBugz1533
change test 15.3.5.4_2-89 to call bound function before returning (Fixes bugzilla 1533)
2014-07-10 14:53:34 -07:00
Murat Sutunc 874ddaeb24 Added contributing.md and improved README 2014-07-10 14:53:31 -07:00
Brian Terlson ee409f9d7d Merge pull request #14 from JaimeLynSchatz/JaimeLynSchatz/fixBugz1561
fix error msgs in test S12.6.1_A1 from Bugzilla issue 1561
2014-07-10 14:32:37 -07:00
Brian Terlson 5920e4e9c9 Merge pull request #6 from JaimeLynSchatz/JaimeLynSchatz/fixBugz1159
change assert to not assume a sorted list of arguments indices (Fixes bugzilla 1159)
2014-07-10 14:25:42 -07:00
Brian Terlson 019a62a863 Merge pull request #7 from JaimeLynSchatz/JaimeLynSchatz/fixBugz1552
fix point of view typos from Bugzilla 1552
2014-07-10 13:45:37 -07:00
Brian Terlson 4f15bf990b Merge pull request #1 from JaimeLynSchatz/JaimeLynSchatz/typofix
fix typo in 10.5 (fixes Bugzilla 1795)
2014-07-10 13:40:27 -07:00
Brian Terlson cb8b373444 Merge pull request #26 from muratsu/intl402-alert
Remove the alert call from test file
2014-07-10 13:39:14 -07:00
Brian Terlson 6cc19d8f7c Merge pull request #30 from jrvidal/bugzilla-1450
Correct shadow behavior in 12.6.4-2 (bugzilla #1450)
2014-07-07 11:24:27 -07:00