Commit Graph

304 Commits

Author SHA1 Message Date
Gorkem Yakin ed32ae6f4a Convert "info" to "description" 2016-02-23 14:24:08 -08:00
Rick Waldron e0afd42914 descriptions and info 2016-02-23 16:42:11 -05:00
Rick Waldron 79dfcf3e85 Restore missing object definitions 2016-02-22 19:17:24 -05:00
Rick Waldron b92e68646d improved info and description 2016-02-22 16:49:00 -05:00
Rick Waldron 2a962f74be id => esid 2016-02-22 14:47:47 -05:00
Rick Waldron 2a112a3190 Exponentiation Operator tests 2016-02-22 14:47:47 -05:00
Leonardo Balter d9a277aa7c Fix location based return value for Date on subclassing tests
Fixes #489
2016-02-22 13:53:43 -05:00
Leonardo Balter bf782c8421 s/id/esid
Fixes #477
2016-02-22 09:47:42 -05:00
Mike Pennisi 82abd59f35 Add test for strict mode of module code 2016-02-19 17:39:41 -05:00
Mike Pennisi 5006055c99 Add tests for `await` as an identifier 2016-02-19 17:39:41 -05:00
Mike Pennisi a6dcd0dcca Add tests for position of module declarations
Assert that ImportDeclaration and ExportDeclaration match only the
ModuleItem symbol.

According to the definition of HostResolveImportedModule, it is
acceptable for an implementation to throw a SyntaxError in the event
that a requested module can neither be found nor created:

> If a Module Record corresponding to the pair referencingModule,
> specifier does not exist or cannot be created, an exception must be
> thrown.

In order to reliably detect a SyntaxError in response to the correct
interpretation of the grammar (and not a SyntaxError from an *incorrect*
interpretation of the grammar followed by a failure to resolve the
requested module), the ModuleSpecifier of ExportDeclarations should
describe a valid resource.
2016-02-19 17:36:17 -05:00
Mike Pennisi 62857dcba7 Rename IterationStatement tests
- Prefix file names to explicitly describe the "head" position
- Remove statement name suffix as this information is reflected by each
  file's location within the file hierarchy
2016-02-16 12:03:21 -05:00
Gorkem Yakin dbcc8cadf3 Merge pull request #507 from bocoup/remove-unused-file
Remove unused harness file
2016-02-12 17:16:01 -08:00
Leonardo Balter ebda746e6a Replace es7id tags with id 2016-02-12 16:22:56 -08:00
Mike Pennisi 071b5f03c6 Remove unused harness file
The harness file `Test262Error.js` has not contained executable code since it
was introduced in this project [1]. The definition of the `Test262Error`
function has consistently been located in the `sta.js` harness file which test
runners are expected to inject into the test environment.

Remove the file and all references to it.

[1] See commit c33bf0e043
2016-02-12 13:44:18 -05:00
Gorkem Yakin 7cd2112bf1 Merge pull request #490 from bocoup/reorg-obj
Move tests for object literals
2016-02-05 09:04:40 -08:00
Mike Pennisi 700f1469e1 Move tests for object literals
Test262 defines tests for expression-producing syntactic forms within
the `language/expressions/` directory. Most tests for object literals
conform to this structure, but 12 such tests were added to the
`language/object-literal/` directory. Move these tests to the canonical
location for object literals.
2016-02-04 09:58:31 -05:00
Mike Pennisi 4dc81d3788 Add tests for tail-call optimization
ECMAScript 2015 introduced tail call optimization for function calls
occuring in a number of positions in the grammar. Assert expected
behavior by triggering a large (but configurable) number of recursive
function calls in these positions. Compliant runtimes will execute such
programs without error; non-compliant runtimes are expected to fail
these tests by throwing an error or crashing when system resources are
exhausted.
2016-02-01 13:20:17 -05:00
Mike Pennisi e62d43c815 Update tests according to ES2016 draft semantics
The ES2016 draft further refines the completion values for `if` and
`with` statements. Two tests must be removed outright because the
completion value in those cases is no longer accessible from the
runtime.
2016-01-22 15:00:54 -05:00
Mike Pennisi 407b8964ce Add tests for ES2015 completion reform
In order to facilitate proper tail calls, ES2015 modified the completion
value of a number of statements.

These tests use `eval` to verify the new values.
2016-01-22 15:00:03 -05:00
Mike Pennisi 19762b927a Add tests for iterator expression in ForIn/Of head
Although the `for..in` statement allows Expressions to define the
iterator, only an AssignmentExpression may occupy this position in the
`for..of` statement.
2016-01-19 12:27:33 -05:00
Gorkem Yakin 4d418a9fe7 Merge pull request #468 from bocoup/subclassing
Subclassing built-in objects
2016-01-14 11:48:57 -08:00
Gorkem Yakin c9764dc5b5 Merge pull request #460 from bocoup/destructuring-binding
Destructuring Binding - syntax and simple initialization
2016-01-13 16:03:24 -08:00
Leonardo Balter 42d1a10d6d fixup! Add tests for Array - calling super with a single argument 2016-01-13 13:28:00 -05:00
Leonardo Balter c99ace29d7 Move subclass tests to test/language/statements/class/subclass/builtin-objects 2016-01-12 16:45:03 -05:00
Leonardo Balter 705940d205 Add tests for Subclassing the built-in Proxy Object 2016-01-12 16:40:19 -05:00
Leonardo Balter d30e98df53 Add tests for Subclassing the built-in Promise Objects 2016-01-12 16:39:00 -05:00
Leonardo Balter 85ee704ad7 Add tests for Subclassing the built-in GeneratorFunction Objects 2016-01-12 15:17:59 -05:00
Leonardo Balter 4e079a8cab Add tests for Subclassing the built-in DataView Objects 2016-01-12 14:02:00 -05:00
Leonardo Balter 0c40ed0cf0 Add tests for Subclassing the built-in ArrayBuffer Objects 2016-01-11 17:57:47 -05:00
Leonardo Balter 4ad09e5060 Add tests for Subclassing the built-in WeakSet Objects 2016-01-11 17:57:47 -05:00
Leonardo Balter ff3724fd43 Add tests for Subclassing the built-in WeakMap Objects 2016-01-11 17:57:46 -05:00
Leonardo Balter 194b6b597f Add tests for Subclassing the built-in Set Objects 2016-01-11 17:57:46 -05:00
Leonardo Balter ba1482df8a Add tests for Subclassing the built-in Map Objects 2016-01-11 17:57:46 -05:00
Leonardo Balter 6fdf6dd752 Add tests for Subclassing the built-in TypedArray Objects 2016-01-11 17:57:46 -05:00
Leonardo Balter 27764aa355 Add tests for Subclassing the built-in String Objects 2016-01-11 17:57:45 -05:00
Leonardo Balter fc160c78ad Add tests for Subclassing the built-in RegExp Objects 2016-01-11 17:57:45 -05:00
Leonardo Balter 5be3a8019d Add tests for Subclassing the built-in Date Objects 2016-01-11 17:57:45 -05:00
Leonardo Balter f5b5ad47e5 Add tests for Subclassing the built-in Number Objects 2016-01-11 17:57:45 -05:00
Leonardo Balter 67ec7fbf7b Add tests for Subclassing the built-in NativeError Objects 2016-01-11 17:57:44 -05:00
Leonardo Balter 390c7a7fdb Add tests for Subclassing the built-in Error Object 2016-01-11 17:57:44 -05:00
Leonardo Balter a5b3c84fbd Add tests for Subclassing the built-in Symbol Object 2016-01-11 17:57:43 -05:00
Leonardo Balter 47faa3ec58 Add tests for Subclassing the built-in Boolean Object 2016-01-11 17:57:43 -05:00
Leonardo Balter 1bcc056914 Add tests for Subclassing the built-in Function Object 2016-01-11 17:57:43 -05:00
Leonardo Balter cde62d08d8 Add tests for Subclassing the built-in Object 2016-01-11 17:57:42 -05:00
Leonardo Balter 7a87731d9c Add tests for Subclassing the built-in Array Object 2016-01-11 17:57:42 -05:00
Leonardo Balter 5e653f2e6c ObjectBindingPatterns can't end with multiple commas 2015-12-29 16:50:23 -05:00
Leonardo Balter 7e24ed9999 Destructuring Binding - syntax and simple initialization 2015-12-29 16:31:12 -05:00
André Bargull 92423d3c9f Add tests for instanceof operator when prototype property is primitive or getter 2015-12-22 19:05:53 +01:00
Jeff Walden 78ca60e6cf Add tests verifying that ASI can't occur after the leading let/const in |let let|, |let let = "...";|, and |const let = "...";|. Each matches the LexicalDeclaration production, then triggers an early error before evaluation because it attempts to bind "let". 2015-12-18 15:03:04 -05: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 bd8c91e250 Updates for ES2016 Draft 2015-12-01
- RegExp.prototype[Symbol.split] calls ToUint32 (https://github.com/tc39/ecma262/issues/92)
- Species lookup removed from Promise.all and Promise.race (https://github.com/tc39/ecma262/issues/151)
- Generator functions are no longer constructors (https://github.com/tc39/ecma262/pull/171)

Fixes #444
2015-12-02 18:07:06 +01:00
André Bargull 56d6eefb69 Fix expected completion value
- if-statement completion value semantics was not properly updated in ES2015
2015-11-11 17:47:15 +01:00
André Bargull 1da4c78051 Revert primitive wrapper prototypes and String#split to ES5
- Revert Number, Boolean and String prototypes to ES5 semantics
- Revert String.prototype.split's to ES5 behavior
2015-11-06 18:50:44 +01:00
Mike Pennisi e39f8d88c5 Add tests for well-known Symbol: @@unscopables 2015-10-05 11:57:31 -04:00
Gorkem Yakin 26e6fd7c17 Convert binary integers to octal in octal integer tests 2015-09-30 08:54:45 -07:00
Brian Terlson 0d9733e93b Merge pull request #432 from cfarm/increment-typo
fixes increment typo
2015-09-18 10:53:14 -07:00
Gorkem Yakin 117c3f386e Merge pull request #418 from bocoup/symbol-to-primitive
Add tests for well-known Symbol: @@toPrimitive
2015-09-18 09:07:51 -07:00
Catherine Farman b175e34478 fixes increment typo 2015-09-18 11:14:32 -04:00
Rick Waldron 5ddb903e98 Merge pull request #393 from anba/non-browser
Improve compatibility for engines without support for Annex B and non-standard features
2015-09-07 15:32:03 -04:00
André Bargull ffec41b7af Improve compatibility for engines without support for Annex B 2015-09-07 20:40:09 +02:00
unknown 35038fdb10 update tests for arrow-function 2015-09-07 14:51:11 +08:00
Rick Waldron 9ccc663936 Merge pull request #415 from anba/remove-runTestCase-finally
Replace runTestCase when used with try-finally
2015-09-04 15:20:26 -04:00
Rick Waldron 2bfe4a4716 Merge pull request #416 from anba/remove-runTestCase-language-rest
Replace runTestCase in test/language (part 2)
2015-09-04 15:18:40 -04:00
Rick Waldron a2554d909b Merge branch 'remove-runTestCase-builtins-other' of https://github.com/anba/test262 into anba-remove-runTestCase-builtins-other
# By André Bargull
# Via André Bargull
* 'remove-runTestCase-builtins-other' of https://github.com/anba/test262:
  Replace runTestCase with assert helpers, rest [test/built-ins]
  Replace runTestCase with assert helpers [test/built-ins]

Conflicts:
	test/built-ins/Array/from/S22.1.2.1_T1.js
	test/built-ins/Array/from/S22.1.2.1_T2.js
	test/built-ins/Array/from/S22.1.2.1_T3.js
2015-09-04 13:25:41 -04:00
Leonardo Balter 73409cea4e Add tests for default parameters 2015-09-02 18:01:51 -04:00
Gorkem Yakin c04984872d Merge pull request #370 from bocoup/symbol-has-instance
Add tests for well-known Symbol, @@hasInstance
2015-08-31 16:32:55 -07:00
Brian Terlson c4231d4948 Merge pull request #420 from bakkot/patch-1
Wrong error message in function-code/S10.2.1_A1.js
2015-08-24 15:25:32 -07:00
Kevin Gibbons 69969e16b1 Remove extraneous indent in header, for consistency 2015-08-24 15:24:10 -07:00
Kevin Gibbons 8759c88bec Wrong error message in function-code/S10.2.1_A1.js 2015-08-18 17:47:02 -07:00
Mike Pennisi 4e88365dc6 Add tests for well-known Symbol: @@toPrimitive 2015-08-16 18:37:22 -04:00
André Bargull 1b14708467 Replace runTestCase with assert helpers [test/built-ins] 2015-08-13 17:50:58 +02:00
André Bargull bd603294cb Replace runTestCase with assert, try-finally 2015-08-13 17:43:11 +02:00
André Bargull 8447a55e49 Replace runTestCase with assert helpers [test/language/directive-prologue] 2015-08-13 17:35:04 +02:00
André Bargull 789224fbaa Replace runTestCase with assert helpers [test/language/function-code] 2015-08-13 17:34:40 +02:00
André Bargull 73d5292b77 Replace runTestCase with assert helpers [test/language/expressions] 2015-08-13 17:34:17 +02:00
André Bargull ee8a222125 Replace runTestCase with assert helpers [test/language/statements] 2015-08-13 17:33:42 +02:00
André Bargull 2d5e7e0d44 Replace runTestCase with assert helpers [test/language/literals] 2015-08-13 17:33:06 +02:00
André Bargull 2fe6cac16a Replace runTestCase with assert helpers [test/language/reserved-words] 2015-08-13 17:32:43 +02:00
André Bargull ba1b02a047 Replace runTestCase with assert helpers [test/language/eval-code] 2015-08-13 17:32:19 +02:00
André Bargull 27b234f708 Replace runTestCase with assert helpers [test/language/arguments-object] 2015-08-13 17:31:54 +02:00
André Bargull 1f97345668 Replace runTestCase with assert.throws [test/language/] 2015-08-11 17:43:21 +02:00
André Bargull 7f55f60b5f Replace runTestCase with assert.throws [test/language/statements] 2015-08-11 17:43:01 +02:00
André Bargull 3de484fe83 Replace runTestCase with assert.throws [test/language/expressions] 2015-08-11 17:42:41 +02:00
André Bargull d45d495ee6 Replace runTestCase with assert helpers [test/language/function-code] 2015-08-06 18:34:38 +02:00
André Bargull f939067d0e Replace runTestCase with assert helpers [test/language/future-reserved-words] 2015-08-06 18:34:15 +02:00
André Bargull 4c582732d0 Replace runTestCase with assert helpers [test/language/line-terminators] 2015-08-06 18:33:54 +02:00
André Bargull 31f027dc03 Replace runTestCase with assert helpers [test/language/types] 2015-08-06 18:33:32 +02:00
André Bargull 3c3e0a6adb Replace runTestCase with assert helpers [test/language/statements/] 2015-08-06 18:33:10 +02:00
André Bargull 713df280e5 Replace runTestCase with assert helpers [test/language/statements/for] 2015-08-06 18:32:38 +02:00
André Bargull efabdf8474 Replace runTestCase with assert helpers [test/language/expressions/] 2015-08-06 18:32:15 +02:00
André Bargull c7e160084c Replace runTestCase with assert helpers [test/language/expressions/object] 2015-08-06 18:31:44 +02:00
André Bargull 4eac0d909e Replace runTestCase with assert helpers [test/language/expressions/delete] 2015-08-06 18:31:06 +02:00
André Bargull ba8a41efe9 Replace runTestCase with assert helpers [test/language/arguments-object] 2015-08-06 18:30:42 +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
Mike Pennisi 9068608ab7 Add tests for RegExp `u` flag 2015-07-24 14:43:20 -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 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
André Bargull 023c7aa69e - Remove inline license
- Remove duplicate word
- Add missing license
2015-07-17 19:55:00 +02:00