Skip to content

Commit

Permalink
Don't use assert() in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
eisenhauer committed Mar 23, 2024
1 parent e008d07 commit 346bce9
Showing 1 changed file with 7 additions and 6 deletions.
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

0 comments on commit 346bce9

Please sign in to comment.