Commit 25e31297 authored by Kenton Varda's avatar Kenton Varda

Fix evalLast() test to actually test what we wanted to test.

parent 6ea8d383
...@@ -404,11 +404,11 @@ TEST(Async, Ordering) { ...@@ -404,11 +404,11 @@ TEST(Async, Ordering) {
}).then([&]() { }).then([&]() {
EXPECT_EQ(5, counter++); EXPECT_EQ(5, counter++);
promises[8] = kj::evalLast([&]() { promises[8] = kj::evalLast([&]() {
EXPECT_EQ(9, counter++); EXPECT_EQ(7, counter++);
promises[9] = kj::evalLater([&]() { promises[9] = kj::evalLater([&]() {
EXPECT_EQ(10, counter++); EXPECT_EQ(8, counter++);
}); }).eagerlyEvaluate(nullptr);
}); }).eagerlyEvaluate(nullptr);
}).eagerlyEvaluate(nullptr); }).eagerlyEvaluate(nullptr);
{ {
...@@ -416,11 +416,11 @@ TEST(Async, Ordering) { ...@@ -416,11 +416,11 @@ TEST(Async, Ordering) {
promises[4] = paf.promise.then([&]() { promises[4] = paf.promise.then([&]() {
EXPECT_EQ(2, counter++); EXPECT_EQ(2, counter++);
promises[6] = kj::evalLast([&]() { promises[6] = kj::evalLast([&]() {
EXPECT_EQ(7, counter++); EXPECT_EQ(9, counter++);
promises[7] = kj::evalLater([&]() { promises[7] = kj::evalLater([&]() {
EXPECT_EQ(8, counter++); EXPECT_EQ(10, counter++);
}); }).eagerlyEvaluate(nullptr);
}); }).eagerlyEvaluate(nullptr);
}).eagerlyEvaluate(nullptr); }).eagerlyEvaluate(nullptr);
paf.fulfiller->fulfill(); paf.fulfiller->fulfill();
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment