Skip to content

Commit

Permalink
Merge pull request #961 from caitp/AsyncFromSyncIterUpdates
Browse files Browse the repository at this point in the history
Update Async-from-Sync Iterator yield* tests
  • Loading branch information
leobalter authored Apr 11, 2017
2 parents bcb7651 + 53ab9ff commit 9ed2491
Show file tree
Hide file tree
Showing 27 changed files with 216 additions and 216 deletions.
16 changes: 8 additions & 8 deletions src/async-generators/yield-star-sync-next.case
Original file line number Diff line number Diff line change
Expand Up @@ -172,11 +172,11 @@ iter.next("next-arg-1").then(v => {
assert.sameValue(log[5].args.length, 1, "next args.length");
assert.sameValue(log[5].args[0], undefined, "next args[0]");

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

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

assert.sameValue(v.value, "next-value-1");
assert.sameValue(v.done, false);
Expand All @@ -192,11 +192,11 @@ iter.next("next-arg-1").then(v => {
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, "get next value (2)");
assert.sameValue(log[10].thisValue.name, "next-result-2", "get next value thisValue");
assert.sameValue(log[10].name, "get next done (2)");
assert.sameValue(log[10].thisValue.name, "next-result-2", "get next done thisValue");

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

assert.sameValue(log[12].name, "after yield*");
assert.sameValue(log[12].value, "next-value-2");
Expand Down
16 changes: 8 additions & 8 deletions src/async-generators/yield-star-sync-return.case
Original file line number Diff line number Diff line change
Expand Up @@ -146,11 +146,11 @@ iter.next().then(v => {
assert.sameValue(log[3].args.length, 1, "return args.length");
assert.sameValue(log[3].args[0], "return-arg-1", "return args[0]");

assert.sameValue(log[4].name, "get return value (1)");
assert.sameValue(log[4].thisValue.name, "return-result-1", "get return value thisValue");
assert.sameValue(log[4].name, "get return done (1)");
assert.sameValue(log[4].thisValue.name, "return-result-1", "get return done thisValue");

assert.sameValue(log[5].name, "get return done (1)");
assert.sameValue(log[5].thisValue.name, "return-result-1", "get return done thisValue");
assert.sameValue(log[5].name, "get return value (1)");
assert.sameValue(log[5].thisValue.name, "return-result-1", "get return value thisValue");

assert.sameValue(v.value, "return-value-1");
assert.sameValue(v.done, false);
Expand All @@ -166,11 +166,11 @@ iter.next().then(v => {
assert.sameValue(log[7].args.length, 1, "return args.length");
assert.sameValue(log[7].args[0], "return-arg-2", "return args[0]");

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

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

assert.sameValue(v.value, "return-value-2");
assert.sameValue(v.done, true);
Expand Down
16 changes: 8 additions & 8 deletions src/async-generators/yield-star-sync-throw.case
Original file line number Diff line number Diff line change
Expand Up @@ -149,11 +149,11 @@ iter.next().then(v => {
assert.sameValue(log[3].args.length, 1, "throw args.length");
assert.sameValue(log[3].args[0], "throw-arg-1", "throw args[0]");

assert.sameValue(log[4].name, "get throw value (1)");
assert.sameValue(log[4].thisValue.name, "throw-result-1", "get throw value thisValue");
assert.sameValue(log[4].name, "get throw done (1)");
assert.sameValue(log[4].thisValue.name, "throw-result-1", "get throw done thisValue");

assert.sameValue(log[5].name, "get throw done (1)");
assert.sameValue(log[5].thisValue.name, "throw-result-1", "get throw done thisValue");
assert.sameValue(log[5].name, "get throw value (1)");
assert.sameValue(log[5].thisValue.name, "throw-result-1", "get throw value thisValue");

assert.sameValue(v.value, "throw-value-1");
assert.sameValue(v.done, false);
Expand All @@ -169,11 +169,11 @@ iter.next().then(v => {
assert.sameValue(log[7].args.length, 1, "throw args.length");
assert.sameValue(log[7].args[0], "throw-arg-2", "throw args[0]");

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

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

assert.sameValue(log[10].name, "after yield*");
assert.sameValue(log[10].value, "throw-value-2");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -185,11 +185,11 @@ iter.next("next-arg-1").then(v => {
assert.sameValue(log[5].args.length, 1, "next args.length");
assert.sameValue(log[5].args[0], undefined, "next args[0]");

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

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

assert.sameValue(v.value, "next-value-1");
assert.sameValue(v.done, false);
Expand All @@ -205,11 +205,11 @@ iter.next("next-arg-1").then(v => {
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, "get next value (2)");
assert.sameValue(log[10].thisValue.name, "next-result-2", "get next value thisValue");
assert.sameValue(log[10].name, "get next done (2)");
assert.sameValue(log[10].thisValue.name, "next-result-2", "get next done thisValue");

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

assert.sameValue(log[12].name, "after yield*");
assert.sameValue(log[12].value, "next-value-2");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -159,11 +159,11 @@ iter.next().then(v => {
assert.sameValue(log[3].args.length, 1, "return args.length");
assert.sameValue(log[3].args[0], "return-arg-1", "return args[0]");

assert.sameValue(log[4].name, "get return value (1)");
assert.sameValue(log[4].thisValue.name, "return-result-1", "get return value thisValue");
assert.sameValue(log[4].name, "get return done (1)");
assert.sameValue(log[4].thisValue.name, "return-result-1", "get return done thisValue");

assert.sameValue(log[5].name, "get return done (1)");
assert.sameValue(log[5].thisValue.name, "return-result-1", "get return done thisValue");
assert.sameValue(log[5].name, "get return value (1)");
assert.sameValue(log[5].thisValue.name, "return-result-1", "get return value thisValue");

assert.sameValue(v.value, "return-value-1");
assert.sameValue(v.done, false);
Expand All @@ -179,11 +179,11 @@ iter.next().then(v => {
assert.sameValue(log[7].args.length, 1, "return args.length");
assert.sameValue(log[7].args[0], "return-arg-2", "return args[0]");

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

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

assert.sameValue(v.value, "return-value-2");
assert.sameValue(v.done, true);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -162,11 +162,11 @@ iter.next().then(v => {
assert.sameValue(log[3].args.length, 1, "throw args.length");
assert.sameValue(log[3].args[0], "throw-arg-1", "throw args[0]");

assert.sameValue(log[4].name, "get throw value (1)");
assert.sameValue(log[4].thisValue.name, "throw-result-1", "get throw value thisValue");
assert.sameValue(log[4].name, "get throw done (1)");
assert.sameValue(log[4].thisValue.name, "throw-result-1", "get throw done thisValue");

assert.sameValue(log[5].name, "get throw done (1)");
assert.sameValue(log[5].thisValue.name, "throw-result-1", "get throw done thisValue");
assert.sameValue(log[5].name, "get throw value (1)");
assert.sameValue(log[5].thisValue.name, "throw-result-1", "get throw value thisValue");

assert.sameValue(v.value, "throw-value-1");
assert.sameValue(v.done, false);
Expand All @@ -182,11 +182,11 @@ iter.next().then(v => {
assert.sameValue(log[7].args.length, 1, "throw args.length");
assert.sameValue(log[7].args[0], "throw-arg-2", "throw args[0]");

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

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

assert.sameValue(log[10].name, "after yield*");
assert.sameValue(log[10].value, "throw-value-2");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -185,11 +185,11 @@ iter.next("next-arg-1").then(v => {
assert.sameValue(log[5].args.length, 1, "next args.length");
assert.sameValue(log[5].args[0], undefined, "next args[0]");

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

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

assert.sameValue(v.value, "next-value-1");
assert.sameValue(v.done, false);
Expand All @@ -205,11 +205,11 @@ iter.next("next-arg-1").then(v => {
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, "get next value (2)");
assert.sameValue(log[10].thisValue.name, "next-result-2", "get next value thisValue");
assert.sameValue(log[10].name, "get next done (2)");
assert.sameValue(log[10].thisValue.name, "next-result-2", "get next done thisValue");

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

assert.sameValue(log[12].name, "after yield*");
assert.sameValue(log[12].value, "next-value-2");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -159,11 +159,11 @@ iter.next().then(v => {
assert.sameValue(log[3].args.length, 1, "return args.length");
assert.sameValue(log[3].args[0], "return-arg-1", "return args[0]");

assert.sameValue(log[4].name, "get return value (1)");
assert.sameValue(log[4].thisValue.name, "return-result-1", "get return value thisValue");
assert.sameValue(log[4].name, "get return done (1)");
assert.sameValue(log[4].thisValue.name, "return-result-1", "get return done thisValue");

assert.sameValue(log[5].name, "get return done (1)");
assert.sameValue(log[5].thisValue.name, "return-result-1", "get return done thisValue");
assert.sameValue(log[5].name, "get return value (1)");
assert.sameValue(log[5].thisValue.name, "return-result-1", "get return value thisValue");

assert.sameValue(v.value, "return-value-1");
assert.sameValue(v.done, false);
Expand All @@ -179,11 +179,11 @@ iter.next().then(v => {
assert.sameValue(log[7].args.length, 1, "return args.length");
assert.sameValue(log[7].args[0], "return-arg-2", "return args[0]");

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

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

assert.sameValue(v.value, "return-value-2");
assert.sameValue(v.done, true);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -162,11 +162,11 @@ iter.next().then(v => {
assert.sameValue(log[3].args.length, 1, "throw args.length");
assert.sameValue(log[3].args[0], "throw-arg-1", "throw args[0]");

assert.sameValue(log[4].name, "get throw value (1)");
assert.sameValue(log[4].thisValue.name, "throw-result-1", "get throw value thisValue");
assert.sameValue(log[4].name, "get throw done (1)");
assert.sameValue(log[4].thisValue.name, "throw-result-1", "get throw done thisValue");

assert.sameValue(log[5].name, "get throw done (1)");
assert.sameValue(log[5].thisValue.name, "throw-result-1", "get throw done thisValue");
assert.sameValue(log[5].name, "get throw value (1)");
assert.sameValue(log[5].thisValue.name, "throw-result-1", "get throw value thisValue");

assert.sameValue(v.value, "throw-value-1");
assert.sameValue(v.done, false);
Expand All @@ -182,11 +182,11 @@ iter.next().then(v => {
assert.sameValue(log[7].args.length, 1, "throw args.length");
assert.sameValue(log[7].args[0], "throw-arg-2", "throw args[0]");

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

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

assert.sameValue(log[10].name, "after yield*");
assert.sameValue(log[10].value, "throw-value-2");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -192,11 +192,11 @@ iter.next("next-arg-1").then(v => {
assert.sameValue(log[5].args.length, 1, "next args.length");
assert.sameValue(log[5].args[0], undefined, "next args[0]");

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

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

assert.sameValue(v.value, "next-value-1");
assert.sameValue(v.done, false);
Expand All @@ -212,11 +212,11 @@ iter.next("next-arg-1").then(v => {
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, "get next value (2)");
assert.sameValue(log[10].thisValue.name, "next-result-2", "get next value thisValue");
assert.sameValue(log[10].name, "get next done (2)");
assert.sameValue(log[10].thisValue.name, "next-result-2", "get next done thisValue");

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

assert.sameValue(log[12].name, "after yield*");
assert.sameValue(log[12].value, "next-value-2");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -166,11 +166,11 @@ iter.next().then(v => {
assert.sameValue(log[3].args.length, 1, "return args.length");
assert.sameValue(log[3].args[0], "return-arg-1", "return args[0]");

assert.sameValue(log[4].name, "get return value (1)");
assert.sameValue(log[4].thisValue.name, "return-result-1", "get return value thisValue");
assert.sameValue(log[4].name, "get return done (1)");
assert.sameValue(log[4].thisValue.name, "return-result-1", "get return done thisValue");

assert.sameValue(log[5].name, "get return done (1)");
assert.sameValue(log[5].thisValue.name, "return-result-1", "get return done thisValue");
assert.sameValue(log[5].name, "get return value (1)");
assert.sameValue(log[5].thisValue.name, "return-result-1", "get return value thisValue");

assert.sameValue(v.value, "return-value-1");
assert.sameValue(v.done, false);
Expand All @@ -186,11 +186,11 @@ iter.next().then(v => {
assert.sameValue(log[7].args.length, 1, "return args.length");
assert.sameValue(log[7].args[0], "return-arg-2", "return args[0]");

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

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

assert.sameValue(v.value, "return-value-2");
assert.sameValue(v.done, true);
Expand Down
Loading

0 comments on commit 9ed2491

Please sign in to comment.