Commit Graph

793 Commits

Author SHA1 Message Date
André Bargull ba8a41efe9 Replace runTestCase with assert helpers [test/language/arguments-object] 2015-08-06 18:30:42 +02:00
André Bargull 7d6d983ff9 Replace runTestCase with assert helpers [test/built-ins/] 2015-08-06 18:27:21 +02:00
André Bargull 50c29deb29 Replace runTestCase with assert helpers [test/built-ins/RegExp] 2015-08-06 18:26:59 +02:00
André Bargull 6cd7b9e275 Replace runTestCase with assert helpers [test/built-ins/Number] 2015-08-06 18:26:38 +02:00
André Bargull 33a7e03a76 Replace runTestCase with assert helpers [test/built-ins/Math] 2015-08-06 18:26:26 +02:00
André Bargull 8ea6a7e374 Replace runTestCase with assert helpers [test/built-ins/JSON] 2015-08-06 18:25:42 +02:00
André Bargull bec8782918 Replace runTestCase with assert helpers [test/built-ins/Date] 2015-08-06 18:25:18 +02:00
André Bargull cf231fb03b Replace runTestCase with assert helpers [test/built-ins/Error] 2015-08-06 18:24:55 +02:00
André Bargull 60a2879133 Replace runTestCase with assert helpers [test/built-ins/Function] 2015-08-06 18:24:43 +02:00
André Bargull b1ecdd00e8 Replace runTestCase with assert helpers [test/built-ins/String] 2015-08-06 18:23:58 +02:00
André Bargull a3bfd5a61f Replace runTestCase with assert helpers [test/built-ins/Array] 2015-08-06 18:19:54 +02:00
André Bargull 174f24b2f3 Replace runTestCase with assert helpers [test/built-ins/Array/prototype/reduceRight] 2015-08-06 18:19:31 +02:00
André Bargull df43797c70 Replace runTestCase with assert helpers [test/built-ins/Array/prototype/reduce] 2015-08-06 18:18:58 +02:00
André Bargull 976a687b27 Replace runTestCase with assert helpers [test/built-ins/Array/prototype/map] 2015-08-06 18:18:33 +02:00
André Bargull e2e4fa4c93 Replace runTestCase with assert helpers [test/built-ins/Array/prototype/filter] 2015-08-06 18:17:56 +02:00
André Bargull 354b7cc11b Replace runTestCase with assert helpers [test/built-ins/Array/prototype/lastIndexOf] 2015-08-06 18:17:18 +02:00
André Bargull 7510a91a7e Replace runTestCase with assert helpers [test/built-ins/Array/prototype/indexOf] 2015-08-06 18:16:54 +02:00
André Bargull 659aa4c0f8 Replace runTestCase with assert helpers [test/built-ins/Array/prototype/some] 2015-08-06 18:16:23 +02:00
André Bargull a87aedd8a5 Replace runTestCase with assert helpers [test/built-ins/Array/prototype/every] 2015-08-06 18:15:59 +02:00
André Bargull e8246fd9f0 Replace runTestCase with assert helpers [test/built-ins/Array/prototype/forEach] 2015-08-06 18:14:23 +02:00
Brian Terlson e06ede9a65 Merge pull request #401 from anba/remove_invalid_array_from_test
Remove invalid Array.from test
2015-08-05 13:32:32 -07:00
Brian Terlson 3a7db54b3e Merge pull request #403 from bocoup/fixes-proxy
Small fixes on Proxy constructor tests
2015-08-05 11:02:26 -07:00
Mike Pennisi bb0cbeb655 Add tests for well-known Symbol: @@replace 2015-08-05 09:39:00 -04:00
André Bargull da6c9b964c Remove invalid Array.from test 2015-08-05 07:25:31 +02:00
unknown e3cf0acb1c update tests for Array.from 2015-08-03 18:20:24 +08:00
Leonardo Balter fbf3b89870 Small fixes on Proxy constructor tests 2015-07-31 17:03:02 -04:00
Leonardo Balter e72f4bcd62 fixup! Add tests for Array.prototype.copyWithin 2015-07-31 16:46:46 -04:00
Leonardo Balter 2a32ff4a66 fixup! Add tests for Array.prototype.copyWithin 2015-07-31 16:44:28 -04:00
André Bargull 932bd1a12c Move intl tests to sub-folders 2015-07-31 17:12:08 +02:00
Brian Terlson eea8807d40 Merge pull request #355 from anba/regexp-unicode
B.1.4 and Unicode RegExps
2015-07-30 15:31:16 -07:00
André Bargull d1f718f806 Change test descriptions 2015-07-29 17:24:16 +02:00
André Bargull 99e32c6912 Add assertion messages 2015-07-29 17:23:48 +02:00
Mike Pennisi 652e35bd32 Add tests for well-known Symbol, @@hasInstance
Assert the behavior of the built-in method on the FunctionPrototype and
the usage of the Symbol by the `instanceof` operator.
2015-07-28 00:08:55 -04:00
Brian Terlson d40961b334 Merge pull request #378 from bocoup/Array.of
Add tests for Array.of
2015-07-27 17:27:20 -07:00
Brian Terlson a89613b4f1 Merge pull request #388 from bocoup/array-find-and-findindex
Update tests for Array#find and Array#findIndex
2015-07-27 17:27:16 -07:00
Leonardo Balter 9ed21dc963 Update tests for Array.of 2015-07-27 20:19:09 -04:00
Leonardo Balter 6a440ee616 Update tests for Array.prototype.findIndex 2015-07-27 20:17:43 -04:00
Leonardo Balter 88435c5201 Update tests for Array.prototype.find 2015-07-27 20:17:43 -04:00
Leonardo Balter e64e17f750 Add and update tests for Array.prototype.fill 2015-07-27 20:16:39 -04:00
Leonardo Balter 935da0827b Add tests for Array.prototype.copyWithin 2015-07-27 20:14:45 -04:00
Brian Terlson 02fbde769c Merge pull request #381 from bocoup/array-iterator-methods
Add and update tests for Array.prototype iterator methods.
2015-07-27 17:08:19 -07:00
Brian Terlson 791b25ebbc Merge pull request #377 from bocoup/symbol-iterator
Add tests for @@iterator
2015-07-27 16:45:51 -07:00
Brian Terlson d54ff00df2 Merge pull request #369 from littledan/master
Reinforce test for the use of ToLength(lastIndex) in RegExp
2015-07-24 14:00:45 -07:00
Brian Terlson cd4461c89e Merge pull request #380 from bocoup/String.prototype.endsWith
Add and update tests for String.prototype.endsWith
2015-07-24 12:51:52 -07:00
Leonardo Balter 33c791e722 String.prototype.startsWith 2015-07-24 15:29:35 -04:00
Leonardo Balter cc4230564a String.prototype.endsWith 2015-07-24 15:28:35 -04:00
Brian Terlson bdd84fb6ae Merge pull request #352 from bocoup/es6-regexp-u
Add tests for RegExp `u` flag
2015-07-24 11:45:18 -07:00
Mike Pennisi 9068608ab7 Add tests for RegExp `u` flag 2015-07-24 14:43:20 -04:00
Mike Pennisi 71fa7b570c Add tests for @@isConcatSpreadable 2015-07-24 14:42:35 -04:00
Leonardo Balter 096b31a05b String.prototype.includes 2015-07-23 18:50:59 -04:00
Brian Terlson 57b3d1752b Merge pull request #366 from bocoup/String.prototype.repeat
Add tests for String.prototype.repeat
2015-07-22 17:13:44 -07:00
Brian Terlson d2c6a3f142 Merge pull request #361 from bocoup/function-name
Add tests for function `name` attribute
2015-07-21 18:55:30 -07:00
Mike Pennisi 2fe074134a Add tests for function `name` attribute
This change set includes tests for most invocations of the
SetFunctionName abstract operation in the ES2015 specification.
Practical testing considerations preclude the introduction of tests for
certain invocations:

- The project is still vetting methods to sustainably test the semantics
  of the Destructuring Binding pattern across all valid productions.
  - 13.3.3.6 Runtime Semantics: IteratorBindingInitialization
  - 13.3.3.7 Runtime Semantics: KeyedBindingInitialization
- Without a loader, there is no way to access a function object declared
  in an ExportDeclaration, so `name` assignment cannot be tested in
  these cases
  - 14.1.19 Runtime Semantics: InstantiateFunctionObject
  - 14.4.12 Runtime Semantics: InstantiateFunctionObject
  - 14.5.15 Runtime Semantics: BindingClassDeclarationEvaluation
  - 15.2.3.11 Runtime Semantics: Evaluation
2015-07-21 20:05:34 -04:00
Mike Pennisi 946121ec66 Add tests for RegExp `y` flag 2015-07-21 20:02:07 -04:00
Brian Terlson e427e67eb6 Merge pull request #358 from bocoup/promise
Extend test coverage for Promise built-in
2015-07-21 16:26:55 -07:00
Dan Ehrenberg 9d2451eb72 Reinforce test for the use of ToLength(lastIndex) in RegExp
Previously, test262 had only a test that ensured that ToLength (for
example, rather than ToInteger) was used in test'ing a RegExp, not
in calls to exec. Although in the ES5 and ES2015 specs there is only
one code path, in some implementations, ToLength is called in from
separate code paths. This patch makes a new test for exec'ing a
RegExp and ensures that ToLength is called.
2015-07-21 14:26:32 -07:00
Brian Terlson cdc6be9631 Merge pull request #359 from bocoup/String.raw
Add tests for String.raw
2015-07-21 13:02:49 -07:00
Leonardo Balter 95349fcb2c String.prototype.normalize 2015-07-21 13:58:37 -04:00
Brian Terlson 7992be11ed Merge pull request #386 from anba/issue-383/test-failures
Fix test regressions
2015-07-17 13:06:38 -07:00
Brian Terlson 2284a46ebf Merge pull request #385 from anba/license
Change license headers to standard format
2015-07-17 11:03:07 -07:00
Brian Terlson 28089fe079 Merge pull request #365 from bocoup/codePointAt
Add tests for String.prototype.codePointAt
2015-07-17 11:01:58 -07:00
André Bargull 023c7aa69e - Remove inline license
- Remove duplicate word
- Add missing license
2015-07-17 19:55:00 +02: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
Brian Terlson ada5db7569 Merge pull request #357 from anba/intl402-ed2
Intl402 ed2
2015-07-16 16:49:03 -07:00
Leonardo Balter d6a96506f5 Add tests for Array.prototype.values 2015-07-16 19:27:21 -04:00
Leonardo Balter c6c61bd50d String.prototype.codePointAt 2015-07-16 18:49:40 -04:00
Brian Terlson 0599e839a3 Merge pull request #349 from bocoup/String.fromCodePoint
Add tests for String.fromCodePoint
2015-07-16 15:42:07 -07:00
Brian Terlson 13ebbebfd6 Merge pull request #360 from bocoup/negative-reform
Negative reform
2015-07-16 15:31:22 -07:00
Leonardo Balter bab81c5fca Update tests for Array.prototype.entries 2015-07-16 18:29:13 -04:00
Leonardo Balter 8f14f236b8 Update tests for Array.prototype.keys 2015-07-16 18:17:12 -04:00
Mike Pennisi 761c384d7c Add tests for Array.prototype.values 2015-07-16 13:05:17 -04:00
Mike Pennisi 5cb1ba27d3 Add tests for Array.from
Limit tests to behavior of method when invoked with an iterable.
2015-07-16 13:05:17 -04:00
Mike Pennisi 741b799286 Add tests for String.prototype[Symbol.iterator] 2015-07-16 13:05:17 -04:00
Mike Pennisi 5c2390699e Add tests for IteratorPrototype intrinsic 2015-07-16 13:05:17 -04:00
Mike Pennisi e4a8900a25 Add test for well-known Symbol, @@iterator 2015-07-16 13:05:16 -04:00
Thomas Wood b10f06ada3 Fix 11.13.1-4-29gs.js incorrect comment explanation
SyntaxError => TypeError for writing to a non-writeable field.

Fixes #372
2015-07-15 20:32:47 +01:00
Leonardo Balter 3ffca82742 String.prototype.repeat 2015-07-14 17:54:02 -04:00
Brian Terlson f25d690a68 Merge pull request #348 from bocoup/WeakMap
Add tests for WeakMap
2015-07-10 14:26:57 -07:00
Leonardo Balter 91900ab646 String.raw 2015-07-10 14:33:19 -04:00
Leonardo Balter a330d0d979 Improve coverage of SetIteratorPrototype 2015-07-10 14:32:03 -04:00
Leonardo Balter 7f1f806f18 WeakMap.prototype attributes 2015-07-10 14:31:27 -04:00
Leonardo Balter 206265e8fe WeakMap.prototype[Symbol.toStringTag] 2015-07-10 14:31:26 -04:00
Leonardo Balter 74665f0558 WeakMap.prototype.set 2015-07-10 14:31:26 -04:00
Leonardo Balter 0887df4c67 WeakMap.prototype.has 2015-07-10 14:31:26 -04:00
Leonardo Balter 7acd163264 WeakMap.prototype.get 2015-07-10 14:31:26 -04:00
Leonardo Balter e44e0c1762 WeakMap.prototype.delete 2015-07-10 14:31:25 -04:00
Leonardo Balter 806beb5ae3 WeakMap.prototype.constructor 2015-07-10 14:31:25 -04:00
Leonardo Balter f0ec4e6de1 WeakMap - core tests 2015-07-10 14:31:25 -04:00
Leonardo Balter 57b7d13781 String.fromCodePoint 2015-07-10 14:30:27 -04:00
André Bargull a57d2736e3 Add additional tests for valid and invalid identity escapes 2015-07-10 20:18:14 +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
Brian Terlson 0027a6b6bf Merge pull request #364 from bocoup/move-fn-proto-tests
Move tests for the FunctionPrototype intrinsic
2015-07-10 11:00:15 -07:00
Mike Pennisi 104025d6d2 Move tests for the FunctionPrototype intrinsic
Test262 maintains most tests for the FunctionPrototype intrinsic within
the `test/built-ins/Function/prototype/` directory. Two tests are
defined within the otherwise-empty `test/built-ins/intrinsics/`
directory; relocate them to the canonical directory for consistency and
discoverability.
2015-07-10 10:51:30 -04:00
Mike Pennisi 6646d3e94f Re-organize class tests
The `test/language/class/` directory contains a small subset of
Test262's tests for ES2015 classes. The majority of tests for classes
are organized within `test/language/statements/class/`.

- Move the tests that rely on the ClassDeclaration syntactic form from
  `test/language/class/` to `test/language/statements/class/`.
- Move the test that relies on the ClassExpression syntactic form from
  `test/language/class/` to `test/language/expressions/class/`.
2015-07-10 10:36:05 -04:00
Brian Terlson 1bc6441cae Merge pull request #356 from anba/regexp-cleanup
Clean-up test comments and remove invalid tests
2015-07-09 16:45:55 -07:00
Brian Terlson 4181994b55 Merge pull request #353 from bocoup/accessor-functions-on-built-in-properties
Add test for built-in accessor properties names
2015-07-09 16:37:51 -07:00
Brian Terlson 0622faca9d Merge pull request #329 from bocoup/unicode-escape-identifiers
Unicode escape identifiers
2015-07-09 16:00:00 -07:00
Mike Pennisi e0d59b0ede Add tests for Unicode escape sequences
- Re-organize existing tests for identifiers
  Name files according to their content (not their ES5 ID). Move tests
  for IdentifierName and LabelIdentifier to more appropriate directories.
- Simplify and correct tests
  Instead of asserting successful runtime evaluation using `eval`, rely
  on the test runner's ability to detect syntax errors. Update the test
  bodies to test the grammar referenced by their ES5 ID and
  description--the IdentifierStart pattern.
- Use `negative` frontmatter to assert SyntaxErrors
- Remove redundant tests
- Use `assert.equal` helper function
- Add equivalent tests for literal unicode chars
- Add tests for variable-length unicode escape
2015-07-09 18:52:22 -04:00
Mike Pennisi 03e862ee14 Re-organize generator tests
The `test/language/generators/` directory contained a single file that
concerned generators derived both from syntactic form and from a
built-in function.

Refactor this test into two files and place each in the appropriate
directory.
2015-07-09 15:07:19 -04:00