summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCaitlin Potter <caitp@igalia.com>2017-10-17 14:34:23 -0400
committerCaitlin Potter <caitp@igalia.com>2017-10-17 14:34:23 -0400
commit1144b5a86b720ddff41c1f2169b5d2c216cb992f (patch)
treee000e52cdf5be6e91bc65396cf4665e2310d2ef7 /src
parent747a2c86cf87a4f3b1dd76025de9158c00d8b057 (diff)
downloadqtdeclarative-testsuites-1144b5a86b720ddff41c1f2169b5d2c216cb992f.tar.gz
Update test cases for spec-change
This change updates test cases to assume that the "next" method is only loaded from a synchronous iterator once, and is re-used for each call to Async-from-Sync Iterator.next(), based on https://github.com/tc39/ecma262/pull/988
Diffstat (limited to 'src')
-rw-r--r--src/async-generators/yield-star-sync-next.case25
1 files changed, 11 insertions, 14 deletions
diff --git a/src/async-generators/yield-star-sync-next.case b/src/async-generators/yield-star-sync-next.case
index 81a7a15b2..940327e5f 100644
--- a/src/async-generators/yield-star-sync-next.case
+++ b/src/async-generators/yield-star-sync-next.case
@@ -184,26 +184,23 @@ iter.next("next-arg-1").then(v => {
assert.sameValue(log.length, 8, "log.length");
iter.next("next-arg-2").then(v => {
- assert.sameValue(log[8].name, "get next");
- assert.sameValue(log[8].thisValue.name, "syncIterator", "get next thisValue");
+ assert.sameValue(log[8].name, "call next");
+ assert.sameValue(log[8].thisValue.name, "syncIterator", "next thisValue");
+ assert.sameValue(log[8].args.length, 1, "next args.length");
+ assert.sameValue(log[8].args[0], "next-arg-2", "next args[0]");
- assert.sameValue(log[9].name, "call next");
- assert.sameValue(log[9].thisValue.name, "syncIterator", "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[9].name, "get next done (2)");
+ assert.sameValue(log[9].thisValue.name, "next-result-2", "get next done 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[10].name, "get next value (2)");
+ assert.sameValue(log[10].thisValue.name, "next-result-2", "get next value 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");
+ assert.sameValue(log[11].name, "after yield*");
+ assert.sameValue(log[11].value, "next-value-2");
assert.sameValue(v.value, "return-value");
assert.sameValue(v.done, true);
- assert.sameValue(log.length, 13, "log.length");
+ assert.sameValue(log.length, 12, "log.length");
}).then($DONE, $DONE);
}).catch($DONE);