From 346bce9dbb6a6fdec9a7bd76d892c09c4928a82c Mon Sep 17 00:00:00 2001 From: Greg Eisenhauer Date: Fri, 22 Mar 2024 21:24:11 -0400 Subject: [PATCH] Don't use assert() in tests --- testing/adios2/engine/bp/TestBPAccuracyDefaults.cpp | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/testing/adios2/engine/bp/TestBPAccuracyDefaults.cpp b/testing/adios2/engine/bp/TestBPAccuracyDefaults.cpp index d0493cdc22..96eb8e61d1 100644 --- a/testing/adios2/engine/bp/TestBPAccuracyDefaults.cpp +++ b/testing/adios2/engine/bp/TestBPAccuracyDefaults.cpp @@ -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 { @@ -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 iStartEndData; iStartEndData.reserve(gNx); // maximum possible