From 9979d727646cc0a1418c352c09f602414adf17d6 Mon Sep 17 00:00:00 2001 From: Caitlin Potter Date: Mon, 10 Apr 2017 18:24:22 -0400 Subject: [PATCH] Update Async-from-Sync Iterator yield* tests Ordering of done and value property loads changed in https://github.com/tc39/proposal-async-iteration/commit/395b2e3b2f5acb62f9fae11c5e189423d4af50e6 --- src/async-generators/yield-star-sync-next.case | 16 ++++++++-------- src/async-generators/yield-star-sync-return.case | 16 ++++++++-------- src/async-generators/yield-star-sync-throw.case | 16 ++++++++-------- 3 files changed, 24 insertions(+), 24 deletions(-) diff --git a/src/async-generators/yield-star-sync-next.case b/src/async-generators/yield-star-sync-next.case index 7f69790e07..b75f882d03 100644 --- a/src/async-generators/yield-star-sync-next.case +++ b/src/async-generators/yield-star-sync-next.case @@ -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); @@ -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"); diff --git a/src/async-generators/yield-star-sync-return.case b/src/async-generators/yield-star-sync-return.case index 8566d0e123..3153987158 100644 --- a/src/async-generators/yield-star-sync-return.case +++ b/src/async-generators/yield-star-sync-return.case @@ -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); @@ -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); diff --git a/src/async-generators/yield-star-sync-throw.case b/src/async-generators/yield-star-sync-throw.case index fd1d49651f..903a2daeaf 100644 --- a/src/async-generators/yield-star-sync-throw.case +++ b/src/async-generators/yield-star-sync-throw.case @@ -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); @@ -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");