From 7713071a8fc4bb3930f129fa68c082a74122ffc3 Mon Sep 17 00:00:00 2001 From: Matthew Kennedy Date: Tue, 23 Jul 2024 15:47:30 -0700 Subject: [PATCH] std::isnan --- unit_tests/tests/test_util.cpp | 4 ++-- unit_tests/tests/trigger/test_trigger_decoder.cpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/unit_tests/tests/test_util.cpp b/unit_tests/tests/test_util.cpp index 4342d4c9fa..b60e9baa05 100644 --- a/unit_tests/tests/test_util.cpp +++ b/unit_tests/tests/test_util.cpp @@ -324,11 +324,11 @@ TEST(misc, testMisc) { } { float v = atoff("nan"); - ASSERT_TRUE(cisnan(v)) << "NaN atoff"; + ASSERT_TRUE(std::isnan(v)) << "NaN atoff"; } { float v = atoff("N"); - ASSERT_TRUE(cisnan(v)) << "NaN atoff"; + ASSERT_TRUE(std::isnan(v)) << "NaN atoff"; } // ASSERT_EQ(true, strEqual("spa3", getPinName(SPARKOUT_3_OUTPUT))); diff --git a/unit_tests/tests/trigger/test_trigger_decoder.cpp b/unit_tests/tests/trigger/test_trigger_decoder.cpp index d5e46656e9..d51f6379f2 100644 --- a/unit_tests/tests/trigger/test_trigger_decoder.cpp +++ b/unit_tests/tests/trigger/test_trigger_decoder.cpp @@ -157,9 +157,9 @@ static void testTriggerDecoder2(const char *msg, engine_type_e type, int synchPo ASSERT_FALSE(t->shapeDefinitionError) << "isError"; ASSERT_EQ(synchPointIndex, t->getTriggerWaveformSynchPointIndex()) << "synchPointIndex"; - if (!cisnan(expectedGapRatio)) { + if (!std::isnan(expectedGapRatio)) { assertEqualsM2("actual gap ratio", expectedGapRatio, initState.triggerSyncGapRatio, 0.001); - } + } } static void assertREquals(void *expected, void *actual) {