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

Use EXPECT_EQ instead of assert() in tests #4108

Merged
merged 1 commit into from
Mar 27, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
13 changes: 7 additions & 6 deletions testing/adios2/engine/bp/TestBPAccuracyDefaults.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,9 @@ TEST_F(AccuracyTests, DefaultAccuracy)
bpWriter.Close();

auto accuracyGot = var.GetAccuracy();
assert(accuracyGot.error == 0.0); // no error whatsoever
assert(accuracyGot.norm == accuracyRequested.norm);
assert(accuracyGot.relative == accuracyRequested.relative);
EXPECT_EQ(accuracyGot.error, 0.0); // no error whatsoever
EXPECT_EQ(accuracyGot.norm, accuracyRequested.norm);
EXPECT_EQ(accuracyGot.relative, accuracyRequested.relative);
}
// Reader
{
Expand All @@ -100,9 +100,10 @@ TEST_F(AccuracyTests, DefaultAccuracy)
bpReader.PerformGets();

auto accuracyGot = varRange.GetAccuracy();
assert(accuracyGot.error == 0.0); // no error whatsoever
assert(accuracyGot.norm == accuracyRequested.norm);
assert(accuracyGot.relative == accuracyRequested.relative);
EXPECT_EQ(accuracyGot.error, 0.0); // no error whatsoever
EXPECT_EQ(accuracyGot.error, 0.0); // no error whatsoever
EXPECT_EQ(accuracyGot.norm, accuracyRequested.norm);
EXPECT_EQ(accuracyGot.relative, accuracyRequested.relative);

std::vector<int64_t> iStartEndData;
iStartEndData.reserve(gNx); // maximum possible
Expand Down