715 Commits

Author SHA1 Message Date
Brian Terlson
69e0ab732e Merge pull request #155 from xtian/xtian-patch-1
Fix typo in CONSOLE-RUNNER.md
2015-02-16 11:44:06 -08:00
Christian Wesselhoeft
7a74770ddc Fix typo in CONSOLE-RUNNER.md 2015-02-16 12:36:28 -07:00
Rick Waldron
51f0c1daad Merge pull request #152 from smikes/undefined-var-truthy-4
fix undefined var
2015-02-16 13:15:28 -05:00
smikes
65e5aa6f79 fix undefined var 2015-02-14 15:02:49 -07:00
Brian Terlson
4b01ef4bcd Merge pull request #148 from bocoup/144
Update front matter to include eithe es5id or es6id where missing. Closes gh-144
2015-02-12 13:43:42 -08:00
Rick Waldron
cda3ec74a1 ES6-specific tests: es5id=>es6id, new es6id entries. Closes gh-144 2015-02-12 16:36:13 -05:00
Brian Terlson
d075338699 Merge pull request #140 from anba/issue-35/expressions
Fix strict mode errors in language/expressions
2014-12-13 11:36:24 -08:00
Brian Terlson
79daca456c Merge pull request #139 from anba/issue-138/defineproperties-exception
Update comments in Object.defineProperties tests (Fixes #138)
2014-12-11 16:40:18 -08:00
Brian Terlson
a8bfcab167 Merge pull request #137 from anba/issue-120/use-annexb-semantics
Revert 12.14-1 and 12.14-2 (Fixes #120)
2014-12-11 16:39:28 -08:00
André Bargull
1a4793926f Fix strict mode errors in language/expressions
- Add missing noStrict flags when tests explicitly require non-strict semantics (e.g. unqualified delete, with statement)
- Change `throw new Exception(...)` to `$ERROR(...)` in call/*
- Replace dynamic strict mode check with noStrict flag in call/11.2.3-3_8
- Align assignment/11.13.1_A3.1 with 11.13.1_A3.2 to avoid creating implicit global variable
- Split test into multiple files when undeclared variable are under test
  - addition/S11.6.1_A2.4_T3
  - division/11.5.2_A2.4_T3
  - does-not-equals/11.9.2_A2.4_T3
  - equals/S11.9.1_A2.4_T3
  - greater-than/S11.8.2_A2.4_T3
  - greater-than-or-equal/S11.8.4_A2.4_T3
  - in/S11.8.7_A2.4_T3
  - instanceof/11.8.6_A2.4_T3
  - left-shift/S11.7.1_A2.4_T3
  - less-than/S11.8.1_A2.4_T3
  - less-than-or-equal/S11.8.3_A2.4_T3
  - modulus/S11.5.3_A2.4_T3
  - multiplication/11.5.1_A2.4_T3
  - right-shift/11.7.2_A2.4_T3
  - strict-does-not-equals/11.9.5_A2.4_T3
  - strict-equals/11.9.4_A2.4_T3
  - subtraction/11.6.2_A2.4_T3
  - unsigned-right-shift/11.7.3_A2.4_T3
- Add declaration when implicit global variable creation not part of the test
  - assignment/11.13.1_A4_T1
  - compound-assignment/S11.13.2_A3.1_T*
  - compound-assignment/S11.13.2_A3.2_T*
  - grouping/11.1.6_A3_T5
  - instanceof/S15.3.5.3_*
- Split test into multiple files when unqualified delete is used
  - delete/S11.4.1_A2.2_T1.js
  - delete/11.4.1_A3.2
  - grouping/S11.1.6_A2
  - grouping/S11.1.6_A3_T6
2014-12-11 19:07:04 +01:00
André Bargull
e12917af66 Update comments in Object.defineProperties tests (Fixes #138)
The expected values were already changed in a previous commit (@49abae4f5e6b38931d86dc9b9d34ae30d9ced2ca),
only the test descriptions still needed to be updated. (Fixes #138)
2014-12-11 19:00:15 +01:00
André Bargull
2903a4c885 Revert 12.14-1 and 12.14-2 (Fixes #120)
Assume tests run with Annex B semantics enabled. (Fixes #120)
2014-12-11 18:45:54 +01:00
smikes
49abae4f5e rework: remove *PropertyAttributes fns
- this change hits all files that use
dataPropertyAttributesAreCorrect or
acccessorPropertyAttributesAreCorrect

Major changes:
- remove include of runTestCase.js,
dataPropertyAttributesAreCorrect.js and
acccessorPropertyAttributesAreCorrect.js
- add include of propertyHelper.js
- remove function testCase() and call to
function runTestCase()
- instead of collecting test state into booleans,
which are eventually returned from runTestCase,
test conditions and throw errors immediately
- use negative: to check error types instead of
using `instanceof` in a catch() block

Selected commit logs follow:

manual conversion of accessorPropertyAttributesAreCorrect() test
 - remove runTestCase
 - remove wrapping testCase function
 - unindent
 - remove includes of runTestCase & accessor...
 - add include of propertyHelper.js
 - unpack final two args 'true, false' to explicit inline
   tests of isEnumerable and isConfigurable
 - unpack setter test into inline logic
 - unpack getter test into inline logic

used script to replace includes: frontmatter
with propertyHelper.js ; manually added back
references to fnGlobalObject() where needed

additional helper functions

add helper functions for get and writable
duplicate runTestCase so can remove runTestCase.js from
includes of all tests in batch

use keyboard macros to simplify repetitive conversions
remove auto-save file accidentaly committed

minor changes, manually remove runTestCase from remaining files
lint etc. fixes

remove now-obsolete harness files

make strict/nonstrict variants

tests where behavior is different in strict/nonstrict
need two variants

- strict mode throws on assign to read-only element (no setter fn)
- strict mode separates named arguments from arguments[]

fix indentation

cleanup minor issues

reviewing 15.2.3.7-9 tests, found some minor issues

- indentation/spacing
- duplicate test (eg, direct test of value and dataProp...)
- remove needless try/finally
- use assert.. helpers in place of if(is..
- rename some assertions to 'e'

rename assertX to verifyX
new helper fn sameValue
test "set" as well as get
reverse order of checks
restore test of desc2
restore test of length
restore test of ownProperty
incorporate suggestions re order of ops, Object.prototype
add test of sameValue helper
restore return value in getter
restore second defineProperty call
restore check of explicit "false"
restore explicit test of TypeError
set noStrict flag on arguments changes
rename catch var to "e"	b4ad0e6
remove dataPropertyAttributesAreCorrect from tests	0d83ff2
remove accessorPropertyAttributesAreCorrect from tests	bb926f3
remove {data,accessor}Property... fns from harness

fix writable check on array.length

call $ERROR if expected exception not thrown
fix Epected => Expected typo

use assert._isSamevalue
2014-12-10 17:39:16 -08:00
smikes
5318ee7b1f minor fixes to Array.protoype.find tests
split "this" tests into strict/nonstrict branches
split callable into separate test cases

metadata: rename es6 to features
2014-12-10 16:53:12 -08:00
André Bargull
0dbafac5a6 Add 'var' declarations for strict mode
This change adds 'var' declarations for global variables to allow the tests to run in strict mode (see issue #35).
Extra care was taken to ensure the changes do not alter the test behavior, for example when implicit creation of global variables are part of the test.
Note: The change does not fix all strict mode errors due to missing 'var' declarations.
2014-12-10 16:37:05 -08:00
André Bargull
0ceb428ec9 Add test coverage for identifier resolution in dynamic scopes
Identifier resolution in dynamic scope context is missing test coverage, resolves https://bugs.ecmascript.org/show_bug.cgi?id=1751 .
2014-12-10 16:05:32 -08:00
Sam Mikes
485059c46d initial tests of Array.prototpe.splice requiring settable "length"
add test of object with only "length" getter
*fix typo

per comments from @anba, thanks!
 * remove needless checks
 * add "splice" method

fix es5id
2014-12-10 15:18:42 -08:00
Mathias Bynens
e2aa196a93 Rename String.prototype.contains to String.prototype.includes 2014-12-10 13:27:42 -08:00
Brian Terlson
a5438b0ab3 Merge pull request #135 from juandopazo/find-holes
Array.prototype.find no longer skips holes
2014-12-09 19:41:30 -08:00
Juan Ignacio Dopazo
d863423d1a Array.prototype.find no longer skips holes 2014-12-09 18:37:41 -08:00
Brian Terlson
b81b71eac2 Fix packager.py for updated locations 2014-12-09 14:52:12 -08:00
Brian Terlson
38291966ff Clean up website assets that are auto-generated 2014-12-09 14:51:44 -08:00
Brian Terlson
b815015d8d Remove console/harness 2014-12-09 13:50:48 -08:00
Brian Terlson
1f2f7d062f Move assert helper as well 2014-12-09 13:46:53 -08:00
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