Skip to content

Commit

Permalink
Fix async generator test
Browse files Browse the repository at this point in the history
Summary: Broken by D58483579

Reviewed By: ispeters

Differential Revision: D58593845

fbshipit-source-id: 1c71575df8dd0c22a958ea5192a2d7fa3ff632a5
  • Loading branch information
iahs authored and facebook-github-bot committed Jun 14, 2024
1 parent ddfba42 commit b89d90e
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions folly/experimental/coro/test/AsyncGeneratorTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -490,7 +490,11 @@ TEST(AsyncGenerator, YieldCoError) {
co_yield "foo";
co_yield "bar";
co_yield folly::coro::co_error(SomeError{});
CHECK(false);
// not enforced in opt mode yet so this code is reached in the
// EXPECT_DEBUG_DEATH line
if (folly::kIsDebug) {
ADD_FAILURE();
}
}();

auto item1 = co_await gen.next();
Expand All @@ -500,7 +504,7 @@ TEST(AsyncGenerator, YieldCoError) {

try {
(void)co_await gen.next();
CHECK(false);
ADD_FAILURE();
} catch (const SomeError&) {
}

Expand Down

0 comments on commit b89d90e

Please sign in to comment.