Commit Graph

3571 Commits

Author SHA1 Message Date
Rick Waldron 849cea38a5 Move test/built-ins/Promise/prototype/reject/ to test/built-ins/Promise/reject/ Closes gh-161 2015-02-17 13:34:48 -05:00
Rick Waldron d9554f9fca Move test/built-ins/Promise/prototype/race/ to test/built-ins/Promise/race/. Closes gh-145 2015-02-17 13:33:34 -05:00
Rick Waldron 4e5be1f257 Move test/built-ins/Promise/prototype/resolve/ to test/built-ins/Promise/resolve. Closes gh-146 2015-02-17 13:31:28 -05:00
Domenic Denicola 1d6c0357c2 Update copyright year in sample copyright 2015-02-17 11:54:51 -05:00
Rick Waldron 775ad82eaf Merge pull request #151 from bocoup/contributing-filenames
Contributing: updates the Test Case Names section. Closes gh-150
2015-02-16 18:07:09 -05:00
Rick Waldron 7ec37d7379 Contributing: updates the Test Case Names section. Closes gh-150. Closes gh-136 2015-02-16 17:39:55 -05:00
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