Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix iree_helpers_test on Windows with callstacks (debug build). #288

Merged
merged 2 commits into from
Oct 17, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 8 additions & 9 deletions shortfin/src/shortfin/support/iree_helpers_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -97,10 +97,9 @@ TEST(iree_error, user_message) {
"Something went wrong",
iree_make_status(IREE_STATUS_CANCELLED, "because I said so"));
} catch (iree::error &e) {
EXPECT_THAT(
std::string(e.what()),
testing::MatchesRegex(
"^Something went wrong: .*: CANCELLED; because I said so$"));
EXPECT_THAT(std::string(e.what()),
testing::ContainsRegex(
"^Something went wrong: .*: CANCELLED; because I said so"));
}
}

Expand All @@ -110,7 +109,7 @@ TEST(iree_error, no_user_message) {
iree_make_status(IREE_STATUS_CANCELLED, "because I said so"));
} catch (iree::error &e) {
EXPECT_THAT(std::string(e.what()),
testing::MatchesRegex("^.*: CANCELLED; because I said so$"));
testing::ContainsRegex("^.*: CANCELLED; because I said so"));
}
}

Expand All @@ -129,7 +128,7 @@ TEST(iree_error, throw_if_error) {
FAIL();
} catch (iree::error &e) {
EXPECT_THAT(std::string(e.what()),
testing::MatchesRegex("^.*: CANCELLED; because I said so$"));
testing::ContainsRegex("^.*: CANCELLED; because I said so"));
}
}

Expand All @@ -140,9 +139,9 @@ TEST(iree_error, throw_if_error_addl_message) {
"oops: %d", 1);
FAIL();
} catch (iree::error &e) {
EXPECT_THAT(
std::string(e.what()),
testing::MatchesRegex("^.*: CANCELLED; because I said so; oops: 1$"));
EXPECT_THAT(std::string(e.what()),
testing::ContainsRegex("^.*: CANCELLED; because I said so;"));
EXPECT_THAT(std::string(e.what()), testing::ContainsRegex("oops: 1"));
}
}

Expand Down
Loading