From 38187b64502b59ca04e2b5f74a18d88cc62d72b3 Mon Sep 17 00:00:00 2001 From: Greg Eisenhauer Date: Wed, 27 Mar 2024 11:16:21 -0400 Subject: [PATCH] Don't use assert() in tests (#4108) --- 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