Commit Graph

37 Commits

Author SHA1 Message Date
jugglinmike 23efc2c96a Extend test for HTML comments (#684)
Extend test for HTML comments

The V8 engine incorrectly requires a leading newline character for
MultiLineComments which contain the optional trailing HTMLCloseComment
[1]. Extend the current tests to fail when such an invalid restriction
is in place.
[1] https://bugs.chromium.org/p/v8/issues/detail?id=5142
2016-06-28 15:54:40 -07:00
jugglinmike 01fe0d331b Add tests for Annex B `Object.prototype` methods (#626) 2016-06-08 12:41:26 -04:00
Leo Balter 1e75730d5f Merge pull request #587 from bocoup/generation-annexb-fns
Add tests for Annex B "function in block" semantics (procedurally generated)
2016-05-31 17:45:48 -04:00
jugglinmike a12e271269 Add tests for RegExp.prototype.compile (#632) 2016-05-30 16:52:04 -04:00
Leo Balter 28e707e367 Merge pull request #631 from bocoup/annex-b-date
Add tests for Annex B extns to Date.prototype
2016-05-19 20:20:36 -04:00
jugglinmike 2c33050732 Add tests for Annex B String.prototype.substr (#628) 2016-05-19 20:18:20 -04:00
jugglinmike c6b0864d2b Extend tests for Annex B String HTML methods (#627)
- Add tests for abrupt completion handling from ToString operations
- Add tests for method property descriptors
- Remove redundant assertion
2016-05-19 20:16:21 -04:00
jugglinmike c6a152558d Add tests for Annex B extn: __proto__ in obj init (#633) 2016-05-19 13:01:07 -04:00
jugglinmike d8f1b92cf4 Add tests for Annex B extn: O.p.__proto__ (#625) 2016-05-16 13:53:43 -04:00
jugglinmike cb40133425 Add tests for Annex B extns to global object (#624)
Extend tests for the `escape` and `unescape` built-ins to assert their
behavior. Rely on the latest ECMAScript draft, which specifies that
`escape` returns hexadecimal codes in upper case.
2016-05-16 13:53:30 -04:00
Mike Pennisi 37b3e7c080 Add tests for Date.prototype.getYear 2016-05-11 10:34:23 -04:00
Mike Pennisi 1a66e812c8 Add tests for Date.prototype.setYear 2016-05-11 10:34:22 -04:00
Mike Pennisi 018ad2110d Streamline tests for Date.prototype.toGMTString
Introduce a test that asserts the equality of
`Date.prototype.toGMTString` and `Date.prototype.toUTCString`, rendering
further tests for the former's behavior unnecessary.
2016-05-11 10:16:39 -04:00
Mike Pennisi 43bce311db Add tests for Annex B extns to RegExp patterns
Remove previously-existing tests in favor of new versions that are more
complete and more appropriately named.
2016-05-10 10:38:04 -04:00
jugglinmike f7a61edc6f Add tests for Annex B extns to numeric literals (#608) 2016-05-09 18:31:23 -04:00
jugglinmike db8ff7cc01 Add tests for Annex B extns to comments (#612) 2016-05-09 18:29:18 -04:00
jugglinmike aebf3d63bc Add tests for Annex B extns to string literals (#610)
This change set does not include a test for restrictions relating to
template literals because such a test already exists in the project.

While a form of this test for string literals in strict mode code
existed previously, it is less precise and relies on unrelated
semantics. Remove the previous form and replace with a more direct
version.
2016-05-06 11:19:09 -04:00
Mike Pennisi eb644bb2da Reduce reliance on `fnGlobalObject.js`
This harness function is not necessary in the majority of cases in which
it is used. Remove its usage to simplify tests and decrease the amount
of domain-specific knowledge necessary to contribute to the test suite.

Persist the harness function itself for use by future tests for ES2015
modules (such a helper is necessary for tests that are interpreted as
module code).
2016-04-25 11:09:21 -07:00
jugglinmike 38329a7038 Add tests for TryStatement binding restrictions (#577)
This changeset includes tests for early errors and those generated
dynamically by eval. It also accounts for relevant AnnexB extensions.
2016-04-21 15:54:25 -04:00
Mike Pennisi d8c686e310 Generate tests 2016-04-18 16:19:29 -04:00
Mike Pennisi fbce4ea11c Reorganize tests for Annex B extensions
The "mainline" tests in Test262 are converging on a more formal
structure. Files are organized as tests for either either "language"
(e.g. syntax-driven) or "built-in" (e.g. API-driven). "Language" test
locations are themselves structured according to whether the syntactic
form under test is an Expression or a Statement.

To limit ambiguity when locating/adding tests, re-organize the tests for
Annex B extensions to match this structure.
2016-02-10 10:15:35 -05:00
André Bargull bb1bda6dfd Add missing tests for "length" and "name" properties of AnnexB built-in functions 2016-01-15 18:11:38 +01:00
André Bargull 5e3eed63b9 Move Symbol.species and AnnexB tests to new subfolders 2016-01-15 18:11:03 +01:00
André Bargull b62dccf1dc Add test cases for recent ES2016 fixes
- lastIndex in RegExp.prototype[Symbol.split]: tc39/ecma262@08b4756747
- Missing number conversion in DataView.prototype.setXXX: tc39/ecma262@4f875fe96d
- Negative zero byteoffset in TypedArray: tc39/ecma262@2d1ed20db7
- EvalDeclarationInstantiation throws TypeError: tc39/ecma262@2be6968715
- BindingRestElement allows BindingPattern: tc39/ecma262@d322357e6b
- Eval in parameters with computed property keys: tc39/ecma262@04e2e9b719
- Use strict with non-simple parameters: tc39/ecma262@15b0db41ed
- __proto__ in strict mode: tc39/ecma262@5c1984334d
2015-12-15 17:33:49 +01:00
André Bargull ffec41b7af Improve compatibility for engines without support for Annex B 2015-09-07 20:40:09 +02:00
Rick Waldron 03d2f68c9c Remove all remaining occurrences of runTestCase 2015-09-04 16:47:13 -04: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
Brian Terlson 2284a46ebf Merge pull request #385 from anba/license
Change license headers to standard format
2015-07-17 11:03:07 -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
Leonardo Balter 22097eeaf4 fixup
- move Object.prototype.__proto__ tests to annexB
- remove RegExp.prototype.unicode name test
2015-07-06 17:50:33 -04:00
André Bargull e31ae1ad9f Invalid language tests
- in-statement-position-label-statement.js is an Annex-B test (B.3.2 Labelled Function Declarations), moved to annexB directory
- identifier-let-allowed-as-lefthandside-expression-strict.js needs to check for a SyntaxError (ES6, 12.1.1)
- Remove sort() calls in test/built-ins/Object/getOwnPropertyNames/*.js
- Remove sort() calls in test/language/block-scope/syntax/for-in/acquire-properties-from-*.js
- verifyConfigurable() needs to called last in test/built-ins/Object/is/length.js
- All productions within ClassBody are implicitly strict, update test/language/class/method-definition/yield-as-*.js accordingly
- Remove unnecessary noStrict flag in test/language/class/method-definition/yield-as-generator-method-binding-identifier.js
- Check own symbols are returned in property creation order from Object.getOwnPropertySymbols():
  - test/language/computed-property-names/basics/symbol.js
  - test/language/computed-property-names/class/method/symbol.js
  - test/language/computed-property-names/class/static/method-symbol.js
  - test/language/computed-property-names/object/method/symbol.js
- Fix copy-paste error in test/language/expressions/object/method-definition/yield-as-function-expression-binding-identifier.js
2015-04-27 16:56:19 +02:00
Caitlin Potter 6e88ac5cec remove non-printable characters from tests 2015-04-18 20:34:08 -04:00
Mike Pennisi 57f08522ee fixup! Move tests for Annex B extensions 2015-04-02 18:42:06 -04:00
Mike Pennisi 4431c2bc56 Import tests from Google V8
These tests are derived from the following files within the Google V8
project:

test/mjsunit/es6/string-html.js
2015-02-20 14:33:47 -05: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 2a74f0ec1b Reorganize ./test 2014-12-07 15:33:09 -08:00