Conversation
| type: SyntaxError | ||
| ---*/ | ||
|
|
||
| (async function* (await) {}); No newline at end of file |
There was a problem hiding this comment.
I believe these two early errors tests are already present in the PR
| ---*/ | ||
|
|
||
| (async function*() {})().next.call((function*() {})()).then(assert.throw.bind(assert), function(err) { | ||
| ass9ert(err instanceof TypeError); |
There was a problem hiding this comment.
Nit: typo.
I would also declare the functions as variables here and put logic on more lines
| esid: pending | ||
| description: > | ||
| next() rejects with a TypeError when receiver is not an AsyncGenerator instance: | ||
| phase: early |
There was a problem hiding this comment.
The phase and type frontmatter bits should be removed, since this is not really a negative test
| type: TypeError | ||
| ---*/ | ||
|
|
||
| (async function*() {})().next.call((function*() {})()).then(assert.throw.bind(assert), function(err) { |
There was a problem hiding this comment.
There's probably a better way to assert that the resolve handler is never called. Maybe just throw a Teat262Assertion in the handler indicating that it shouldn't be called, it's easier to understand
There was a problem hiding this comment.
I can't find Test262Assertion (or Teat262Assertion) in the source. I'll throw an Error - let me know if that's fine.
There was a problem hiding this comment.
Mobile Swype makes code review hard. It's Test262Error
| /*--- | ||
| esid: early | ||
| description: > | ||
| `Symbol.iterator` property descriptor |
|
|
||
| var OSymbol = $.createRealm().global.Symbol; | ||
|
|
||
| assert.sameValue(Symbol.asyncIterator, Symbol.asyncIterator); |
There was a problem hiding this comment.
This assertion looks wrong, missing the other realm symbol
| features: [Symbol.asyncIterator] | ||
| ---*/ | ||
|
|
||
| var OSymbol = $.createRealm().global.Symbol; |
There was a problem hiding this comment.
OSymbol could probably be more descriptive of what it is
There was a problem hiding this comment.
I copied it from the regular async function tests, what would be a good name?
There was a problem hiding this comment.
I'd probably call it otherRealmSymbol, but it's just personal preference
|
Ok, going to do that, thanks.
…On Fri, Jan 13, 2017 at 5:21 PM, ⭐caitp⭐ ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In test/built-ins/Symbol/asyncIterator/cross-realm.js
<#2>:
> @@ -0,0 +1,15 @@
+// Copyright (C) 2016 the V8 project authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+author: Benjamin Gruenbaum ***@***.***>
+esid: early
+description: Value shared by all realms
+info: >
+ Unless otherwise specified, well-known symbols values are shared by all
+ realms.
+features: [Symbol.asyncIterator]
+---*/
+
+var OSymbol = $.createRealm().global.Symbol;
I'd probably call it otherRealmSymbol, but it's just personal preference
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#2>, or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABQSzZpWWd6h_jZSb5GB9C-iWbapDsLWks5rR5Z1gaJpZM4Li9F1>
.
|
symbol tests more symbol tests feedback by caitp simplify symbol test fix built in tests initial work ORealm -> otherRealmSymbol Error->Test262Error figure out what these tests mean subclass tests 6.3.2.1
c149e24 to
93e6855
Compare
…ingr/test262 into AsyncGeneratorExpressions
…ingr/test262 into AsyncGeneratorExpressions
# The first commit's message is: initial work fix test to reject instead of throw symbol tests more symbol tests feedback by caitp simplify symbol test fix built in tests initial work ORealm -> otherRealmSymbol Error->Test262Error figure out what these tests mean AsyncGeneratorMethod throw a SyntaxError if UniqueFormalParameters contains AwaitExpression AsyncGeneratorMethod throw a SyntaxError if UniqueFormalParameters contains YieldExpression. AsyncGeneratorMethod throw a SyntaxError if HasDirectSuper of AsyncGeneratorMethod is true. async generators test fix test to reject instead of throw symbol tests more symbol tests feedback by caitp simplify symbol test fix built in tests initial work ORealm -> otherRealmSymbol Error->Test262Error figure out what these tests mean subclass tests 6.3.2.1 # This is the commit message caitp#2: test name # This is the commit message tc39#3: port thefourtheyes tests # This is the commit message tc39#4: fixed async/yield test naming (added expression), also added two tests for yield/await named params # This is the commit message tc39#5: oops, untracked accesors # This is the commit message tc39#6: renamed tests to conform with other early tests # This is the commit message tc39#7: removed unnecessary copyright # This is the commit message tc39#8: added wrongly created file # This is the commit message tc39#9: Update AsyncGenerator-is-extensible.js
Async generator expressions
…ingr/test262 into AsyncGeneratorExpressions
fced437 to
17c6ab2
Compare
|
OK, we're done for the day, please take a look and let me know. |
|
@caitp I'm done for the day - please take a look, I'll fix any issues you run into. |
caitp
left a comment
There was a problem hiding this comment.
the one thing is, I think it's better if the tests by each author are grouped into their own commits, and possibly their own pull requests on the test262 repository, to make CLA verification easier, and so that the author of specific tests is attributed as the author of the commit when merged.
I think I'd prefer to review this stuff on the upstream repository. But here's a few minor comments
| author: Benjamin Gruenbaum <benjamingr@gmail.com> | ||
| esid: pending | ||
| description: > | ||
| %AsyncGeneratorProrotype% creates functions with or without new and handles arguments |
There was a problem hiding this comment.
This is mostly about arguments parsing in CreateDynamicFunction
| description: > | ||
| %AsyncGeneratorFunction% is a subclass of Function | ||
| (The AsyncGeneratorFunction constructor is a standard built-in | ||
| function object that inherits from the Function constructor. ) |
There was a problem hiding this comment.
The parenthesized bit might not add much, dunno
| ---*/ | ||
|
|
||
| async function* foo() { }; | ||
| assert("next" in Object.getPrototypeOf(foo())); |
There was a problem hiding this comment.
Let's do hasOwnProperty instead here and similar places, rather than "in" --- or even just getOwnProperty and check the property descriptor too
| /*--- | ||
| author: Sakthipriyan Vairamani (thefourtheye) <thechargingvolcano@gmail.com> | ||
| description: Check if %AsyncGeneratorFunction% function's `prototype` | ||
| object's `constructor` property is %AsyncGeneratorFunction% |
| `.constructor` property. | ||
| ---*/ | ||
|
|
||
| const AsyncGeneratorFunction = async function* () {}.constructor; |
There was a problem hiding this comment.
Many test262 tests avoid using lexical variables unless specifically testing things related to lexical variables
| @@ -0,0 +1,17 @@ | |||
| // Copyright (C) 2015-2017 the V8 project authors. All rights reserved. | |||
There was a problem hiding this comment.
I'd probably rename this file to just "asyncIterator.js" unless this matches the conventions of the other well known symbol tests
There was a problem hiding this comment.
This matches the conventions of the async function tests. I don't feel strongly about the name though.
c43a36a to
995b9af
Compare
| ---*/ | ||
|
|
||
|
|
||
| assert.sameValue(Symbol.asyncIterator.name, '[Symbol.asyncIterator]'); |
There was a problem hiding this comment.
"[Symbol.asyncIterator]" is not a name of the symbol, but the method of %AsyncIteratorPrototype%
https://tc39.github.io/proposal-async-iteration/#sec-asynciteratorprototype-asynciterator
No description provided.