Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update async iteration tests with respect to pending spec change #1250

Merged
merged 2 commits into from
Oct 4, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 18 additions & 21 deletions src/async-generators/yield-star-async-next.case
Original file line number Diff line number Diff line change
Expand Up @@ -208,35 +208,32 @@ iter.next("next-arg-1").then(v => {
assert.sameValue(log.length, 9, "log.length");

iter.next("next-arg-2").then(v => {
assert.sameValue(log[9].name, "get next");
assert.sameValue(log[9].thisValue.name, "asyncIterator", "get next thisValue");
assert.sameValue(log[9].name, "call next");
assert.sameValue(log[9].thisValue.name, "asyncIterator", "next thisValue");
assert.sameValue(log[9].args.length, 1, "next args.length");
assert.sameValue(log[9].args[0], "next-arg-2", "next args[0]");

assert.sameValue(log[10].name, "call next");
assert.sameValue(log[10].thisValue.name, "asyncIterator", "next thisValue");
assert.sameValue(log[10].args.length, 1, "next args.length");
assert.sameValue(log[10].args[0], "next-arg-2", "next args[0]");
assert.sameValue(log[10].name, "get next then (2)");
assert.sameValue(log[10].thisValue.name, "next-promise-2", "get next then thisValue");

assert.sameValue(log[11].name, "get next then (2)");
assert.sameValue(log[11].thisValue.name, "next-promise-2", "get next then thisValue");
assert.sameValue(log[11].name, "call next then (2)");
assert.sameValue(log[11].thisValue.name, "next-promise-2", "next then thisValue");
assert.sameValue(log[11].args.length, 2, "next then args.length");
assert.sameValue(typeof log[11].args[0], "function", "next then args[0]");
assert.sameValue(typeof log[11].args[1], "function", "next then args[1]");

assert.sameValue(log[12].name, "call next then (2)");
assert.sameValue(log[12].thisValue.name, "next-promise-2", "next then thisValue");
assert.sameValue(log[12].args.length, 2, "next then args.length");
assert.sameValue(typeof log[12].args[0], "function", "next then args[0]");
assert.sameValue(typeof log[12].args[1], "function", "next then args[1]");
assert.sameValue(log[12].name, "get next done (2)");
assert.sameValue(log[12].thisValue.name, "next-result-2", "get next done thisValue");

assert.sameValue(log[13].name, "get next done (2)");
assert.sameValue(log[13].thisValue.name, "next-result-2", "get next done thisValue");
assert.sameValue(log[13].name, "get next value (2)");
assert.sameValue(log[13].thisValue.name, "next-result-2", "get next value thisValue");

assert.sameValue(log[14].name, "get next value (2)");
assert.sameValue(log[14].thisValue.name, "next-result-2", "get next value thisValue");

assert.sameValue(log[15].name, "after yield*");
assert.sameValue(log[15].value, "next-value-2");
assert.sameValue(log[14].name, "after yield*");
assert.sameValue(log[14].value, "next-value-2");

assert.sameValue(v.value, "return-value");
assert.sameValue(v.done, true);

assert.sameValue(log.length, 16, "log.length");
assert.sameValue(log.length, 15, "log.length");
}).then($DONE, $DONE);
}).catch($DONE);
Original file line number Diff line number Diff line change
Expand Up @@ -185,36 +185,33 @@ iter.next("next-arg-1").then(v => {
assert.sameValue(log.length, 9, "log.length");

iter.next("next-arg-2").then(v => {
assert.sameValue(log[9].name, "get next");
assert.sameValue(log[9].thisValue.name, "asyncIterator", "get next thisValue");
assert.sameValue(log[9].name, "call next");
assert.sameValue(log[9].thisValue.name, "asyncIterator", "next thisValue");
assert.sameValue(log[9].args.length, 1, "next args.length");
assert.sameValue(log[9].args[0], "next-arg-2", "next args[0]");

assert.sameValue(log[10].name, "call next");
assert.sameValue(log[10].thisValue.name, "asyncIterator", "next thisValue");
assert.sameValue(log[10].args.length, 1, "next args.length");
assert.sameValue(log[10].args[0], "next-arg-2", "next args[0]");
assert.sameValue(log[10].name, "get next then (2)");
assert.sameValue(log[10].thisValue.name, "next-promise-2", "get next then thisValue");

assert.sameValue(log[11].name, "get next then (2)");
assert.sameValue(log[11].thisValue.name, "next-promise-2", "get next then thisValue");
assert.sameValue(log[11].name, "call next then (2)");
assert.sameValue(log[11].thisValue.name, "next-promise-2", "next then thisValue");
assert.sameValue(log[11].args.length, 2, "next then args.length");
assert.sameValue(typeof log[11].args[0], "function", "next then args[0]");
assert.sameValue(typeof log[11].args[1], "function", "next then args[1]");

assert.sameValue(log[12].name, "call next then (2)");
assert.sameValue(log[12].thisValue.name, "next-promise-2", "next then thisValue");
assert.sameValue(log[12].args.length, 2, "next then args.length");
assert.sameValue(typeof log[12].args[0], "function", "next then args[0]");
assert.sameValue(typeof log[12].args[1], "function", "next then args[1]");
assert.sameValue(log[12].name, "get next done (2)");
assert.sameValue(log[12].thisValue.name, "next-result-2", "get next done thisValue");

assert.sameValue(log[13].name, "get next done (2)");
assert.sameValue(log[13].thisValue.name, "next-result-2", "get next done thisValue");
assert.sameValue(log[13].name, "get next value (2)");
assert.sameValue(log[13].thisValue.name, "next-result-2", "get next value thisValue");

assert.sameValue(log[14].name, "get next value (2)");
assert.sameValue(log[14].thisValue.name, "next-result-2", "get next value thisValue");

assert.sameValue(log[15].name, "after yield*");
assert.sameValue(log[15].value, "next-value-2");
assert.sameValue(log[14].name, "after yield*");
assert.sameValue(log[14].value, "next-value-2");

assert.sameValue(v.value, "return-value");
assert.sameValue(v.done, true);

assert.sameValue(log.length, 16, "log.length");
assert.sameValue(log.length, 15, "log.length");
}).then($DONE, $DONE);
}).catch($DONE);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -185,36 +185,33 @@ iter.next("next-arg-1").then(v => {
assert.sameValue(log.length, 9, "log.length");

iter.next("next-arg-2").then(v => {
assert.sameValue(log[9].name, "get next");
assert.sameValue(log[9].thisValue.name, "asyncIterator", "get next thisValue");
assert.sameValue(log[9].name, "call next");
assert.sameValue(log[9].thisValue.name, "asyncIterator", "next thisValue");
assert.sameValue(log[9].args.length, 1, "next args.length");
assert.sameValue(log[9].args[0], "next-arg-2", "next args[0]");

assert.sameValue(log[10].name, "call next");
assert.sameValue(log[10].thisValue.name, "asyncIterator", "next thisValue");
assert.sameValue(log[10].args.length, 1, "next args.length");
assert.sameValue(log[10].args[0], "next-arg-2", "next args[0]");
assert.sameValue(log[10].name, "get next then (2)");
assert.sameValue(log[10].thisValue.name, "next-promise-2", "get next then thisValue");

assert.sameValue(log[11].name, "get next then (2)");
assert.sameValue(log[11].thisValue.name, "next-promise-2", "get next then thisValue");
assert.sameValue(log[11].name, "call next then (2)");
assert.sameValue(log[11].thisValue.name, "next-promise-2", "next then thisValue");
assert.sameValue(log[11].args.length, 2, "next then args.length");
assert.sameValue(typeof log[11].args[0], "function", "next then args[0]");
assert.sameValue(typeof log[11].args[1], "function", "next then args[1]");

assert.sameValue(log[12].name, "call next then (2)");
assert.sameValue(log[12].thisValue.name, "next-promise-2", "next then thisValue");
assert.sameValue(log[12].args.length, 2, "next then args.length");
assert.sameValue(typeof log[12].args[0], "function", "next then args[0]");
assert.sameValue(typeof log[12].args[1], "function", "next then args[1]");
assert.sameValue(log[12].name, "get next done (2)");
assert.sameValue(log[12].thisValue.name, "next-result-2", "get next done thisValue");

assert.sameValue(log[13].name, "get next done (2)");
assert.sameValue(log[13].thisValue.name, "next-result-2", "get next done thisValue");
assert.sameValue(log[13].name, "get next value (2)");
assert.sameValue(log[13].thisValue.name, "next-result-2", "get next value thisValue");

assert.sameValue(log[14].name, "get next value (2)");
assert.sameValue(log[14].thisValue.name, "next-result-2", "get next value thisValue");

assert.sameValue(log[15].name, "after yield*");
assert.sameValue(log[15].value, "next-value-2");
assert.sameValue(log[14].name, "after yield*");
assert.sameValue(log[14].value, "next-value-2");

assert.sameValue(v.value, "return-value");
assert.sameValue(v.done, true);

assert.sameValue(log.length, 16, "log.length");
assert.sameValue(log.length, 15, "log.length");
}).then($DONE, $DONE);
}).catch($DONE);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -192,36 +192,33 @@ iter.next("next-arg-1").then(v => {
assert.sameValue(log.length, 9, "log.length");

iter.next("next-arg-2").then(v => {
assert.sameValue(log[9].name, "get next");
assert.sameValue(log[9].thisValue.name, "asyncIterator", "get next thisValue");
assert.sameValue(log[9].name, "call next");
assert.sameValue(log[9].thisValue.name, "asyncIterator", "next thisValue");
assert.sameValue(log[9].args.length, 1, "next args.length");
assert.sameValue(log[9].args[0], "next-arg-2", "next args[0]");

assert.sameValue(log[10].name, "call next");
assert.sameValue(log[10].thisValue.name, "asyncIterator", "next thisValue");
assert.sameValue(log[10].args.length, 1, "next args.length");
assert.sameValue(log[10].args[0], "next-arg-2", "next args[0]");
assert.sameValue(log[10].name, "get next then (2)");
assert.sameValue(log[10].thisValue.name, "next-promise-2", "get next then thisValue");

assert.sameValue(log[11].name, "get next then (2)");
assert.sameValue(log[11].thisValue.name, "next-promise-2", "get next then thisValue");
assert.sameValue(log[11].name, "call next then (2)");
assert.sameValue(log[11].thisValue.name, "next-promise-2", "next then thisValue");
assert.sameValue(log[11].args.length, 2, "next then args.length");
assert.sameValue(typeof log[11].args[0], "function", "next then args[0]");
assert.sameValue(typeof log[11].args[1], "function", "next then args[1]");

assert.sameValue(log[12].name, "call next then (2)");
assert.sameValue(log[12].thisValue.name, "next-promise-2", "next then thisValue");
assert.sameValue(log[12].args.length, 2, "next then args.length");
assert.sameValue(typeof log[12].args[0], "function", "next then args[0]");
assert.sameValue(typeof log[12].args[1], "function", "next then args[1]");
assert.sameValue(log[12].name, "get next done (2)");
assert.sameValue(log[12].thisValue.name, "next-result-2", "get next done thisValue");

assert.sameValue(log[13].name, "get next done (2)");
assert.sameValue(log[13].thisValue.name, "next-result-2", "get next done thisValue");
assert.sameValue(log[13].name, "get next value (2)");
assert.sameValue(log[13].thisValue.name, "next-result-2", "get next value thisValue");

assert.sameValue(log[14].name, "get next value (2)");
assert.sameValue(log[14].thisValue.name, "next-result-2", "get next value thisValue");

assert.sameValue(log[15].name, "after yield*");
assert.sameValue(log[15].value, "next-value-2");
assert.sameValue(log[14].name, "after yield*");
assert.sameValue(log[14].value, "next-value-2");

assert.sameValue(v.value, "return-value");
assert.sameValue(v.done, true);

assert.sameValue(log.length, 16, "log.length");
assert.sameValue(log.length, 15, "log.length");
}).then($DONE, $DONE);
}).catch($DONE);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -192,36 +192,33 @@ iter.next("next-arg-1").then(v => {
assert.sameValue(log.length, 9, "log.length");

iter.next("next-arg-2").then(v => {
assert.sameValue(log[9].name, "get next");
assert.sameValue(log[9].thisValue.name, "asyncIterator", "get next thisValue");
assert.sameValue(log[9].name, "call next");
assert.sameValue(log[9].thisValue.name, "asyncIterator", "next thisValue");
assert.sameValue(log[9].args.length, 1, "next args.length");
assert.sameValue(log[9].args[0], "next-arg-2", "next args[0]");

assert.sameValue(log[10].name, "call next");
assert.sameValue(log[10].thisValue.name, "asyncIterator", "next thisValue");
assert.sameValue(log[10].args.length, 1, "next args.length");
assert.sameValue(log[10].args[0], "next-arg-2", "next args[0]");
assert.sameValue(log[10].name, "get next then (2)");
assert.sameValue(log[10].thisValue.name, "next-promise-2", "get next then thisValue");

assert.sameValue(log[11].name, "get next then (2)");
assert.sameValue(log[11].thisValue.name, "next-promise-2", "get next then thisValue");
assert.sameValue(log[11].name, "call next then (2)");
assert.sameValue(log[11].thisValue.name, "next-promise-2", "next then thisValue");
assert.sameValue(log[11].args.length, 2, "next then args.length");
assert.sameValue(typeof log[11].args[0], "function", "next then args[0]");
assert.sameValue(typeof log[11].args[1], "function", "next then args[1]");

assert.sameValue(log[12].name, "call next then (2)");
assert.sameValue(log[12].thisValue.name, "next-promise-2", "next then thisValue");
assert.sameValue(log[12].args.length, 2, "next then args.length");
assert.sameValue(typeof log[12].args[0], "function", "next then args[0]");
assert.sameValue(typeof log[12].args[1], "function", "next then args[1]");
assert.sameValue(log[12].name, "get next done (2)");
assert.sameValue(log[12].thisValue.name, "next-result-2", "get next done thisValue");

assert.sameValue(log[13].name, "get next done (2)");
assert.sameValue(log[13].thisValue.name, "next-result-2", "get next done thisValue");
assert.sameValue(log[13].name, "get next value (2)");
assert.sameValue(log[13].thisValue.name, "next-result-2", "get next value thisValue");

assert.sameValue(log[14].name, "get next value (2)");
assert.sameValue(log[14].thisValue.name, "next-result-2", "get next value thisValue");

assert.sameValue(log[15].name, "after yield*");
assert.sameValue(log[15].value, "next-value-2");
assert.sameValue(log[14].name, "after yield*");
assert.sameValue(log[14].value, "next-value-2");

assert.sameValue(v.value, "return-value");
assert.sameValue(v.done, true);

assert.sameValue(log.length, 16, "log.length");
assert.sameValue(log.length, 15, "log.length");
}).then($DONE, $DONE);
}).catch($DONE);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -185,36 +185,33 @@ iter.next("next-arg-1").then(v => {
assert.sameValue(log.length, 9, "log.length");

iter.next("next-arg-2").then(v => {
assert.sameValue(log[9].name, "get next");
assert.sameValue(log[9].thisValue.name, "asyncIterator", "get next thisValue");
assert.sameValue(log[9].name, "call next");
assert.sameValue(log[9].thisValue.name, "asyncIterator", "next thisValue");
assert.sameValue(log[9].args.length, 1, "next args.length");
assert.sameValue(log[9].args[0], "next-arg-2", "next args[0]");

assert.sameValue(log[10].name, "call next");
assert.sameValue(log[10].thisValue.name, "asyncIterator", "next thisValue");
assert.sameValue(log[10].args.length, 1, "next args.length");
assert.sameValue(log[10].args[0], "next-arg-2", "next args[0]");
assert.sameValue(log[10].name, "get next then (2)");
assert.sameValue(log[10].thisValue.name, "next-promise-2", "get next then thisValue");

assert.sameValue(log[11].name, "get next then (2)");
assert.sameValue(log[11].thisValue.name, "next-promise-2", "get next then thisValue");
assert.sameValue(log[11].name, "call next then (2)");
assert.sameValue(log[11].thisValue.name, "next-promise-2", "next then thisValue");
assert.sameValue(log[11].args.length, 2, "next then args.length");
assert.sameValue(typeof log[11].args[0], "function", "next then args[0]");
assert.sameValue(typeof log[11].args[1], "function", "next then args[1]");

assert.sameValue(log[12].name, "call next then (2)");
assert.sameValue(log[12].thisValue.name, "next-promise-2", "next then thisValue");
assert.sameValue(log[12].args.length, 2, "next then args.length");
assert.sameValue(typeof log[12].args[0], "function", "next then args[0]");
assert.sameValue(typeof log[12].args[1], "function", "next then args[1]");
assert.sameValue(log[12].name, "get next done (2)");
assert.sameValue(log[12].thisValue.name, "next-result-2", "get next done thisValue");

assert.sameValue(log[13].name, "get next done (2)");
assert.sameValue(log[13].thisValue.name, "next-result-2", "get next done thisValue");
assert.sameValue(log[13].name, "get next value (2)");
assert.sameValue(log[13].thisValue.name, "next-result-2", "get next value thisValue");

assert.sameValue(log[14].name, "get next value (2)");
assert.sameValue(log[14].thisValue.name, "next-result-2", "get next value thisValue");

assert.sameValue(log[15].name, "after yield*");
assert.sameValue(log[15].value, "next-value-2");
assert.sameValue(log[14].name, "after yield*");
assert.sameValue(log[14].value, "next-value-2");

assert.sameValue(v.value, "return-value");
assert.sameValue(v.done, true);

assert.sameValue(log.length, 16, "log.length");
assert.sameValue(log.length, 15, "log.length");
}).then($DONE, $DONE);
}).catch($DONE);

Expand Down
Loading