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

[libc++][NFC] Make AssertionInfoMatcher::CheckMessageMatches Stricter #77721

Merged
merged 3 commits into from
Jan 12, 2024
Merged
Show file tree
Hide file tree
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
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ int main(int, char**) {
{
std::layout_left::mapping<std::dextents<int, 3>> m{std::dextents<int, 3>{100, 100, 100}};

TEST_LIBCPP_ASSERT_FAILURE(m.stride(4), "invalid rank index");
TEST_LIBCPP_ASSERT_FAILURE(m.stride(4), "layout_left::mapping::stride(): invalid rank index");
}
return 0;
}
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ int main(int, char**) {
{
std::layout_right::mapping<std::dextents<int, 3>> m{std::dextents<int, 3>{100, 100, 100}};

TEST_LIBCPP_ASSERT_FAILURE(m.stride(4), "invalid rank index");
TEST_LIBCPP_ASSERT_FAILURE(m.stride(4), "layout_right::mapping::stride(): invalid rank index");
}
return 0;
}
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ int main(int, char**) {
std::layout_stride::mapping<std::dextents<int, 3>> m(
std::dextents<int, 3>(100, 100, 100), std::array<int, 3>{1, 100, 10000});

TEST_LIBCPP_ASSERT_FAILURE(m.stride(4), "invalid rank index");
TEST_LIBCPP_ASSERT_FAILURE(m.stride(4), "layout_stride::mapping::stride(): invalid rank index");
}
return 0;
}
3 changes: 1 addition & 2 deletions libcxx/test/support/check_assertion.h
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,7 @@ struct AssertionInfoMatcher {
std::size_t found_at = got_msg.find(msg_);
if (found_at == std::string_view::npos)
return false;
// Allow any match
return true;
return found_at == 0 && got_msg.size() == msg_.size();
hawkinsw marked this conversation as resolved.
Show resolved Hide resolved
}
private:
bool is_empty_;
Expand Down