std::isnan

This commit is contained in:
Matthew Kennedy 2024-07-23 15:47:30 -07:00
parent 09c38796ee
commit 7713071a8f
2 changed files with 4 additions and 4 deletions

View File

@ -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)));

View File

@ -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) {