Skip to content

Commit 1ddb2f7

Browse files
committed
Fix test case for logical not operator
1 parent e40d054 commit 1ddb2f7

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

tests/TreeFunctionsTest.cpp

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -573,9 +573,13 @@ TEST_F(TreeFunctions, LogicalNotOperator)
573573
bnotNode->func(bnotNode, &valuePointer);
574574
EXPECT_PRJM_F_EQ(*valuePointer, 1.0) << "!0";
575575

576-
var1->value = 0.00000000001;
576+
var1->value = 0.0001;
577577
bnotNode->func(bnotNode, &valuePointer);
578-
EXPECT_PRJM_F_EQ(*valuePointer, 0.0) << "!0.00000000001";
578+
EXPECT_PRJM_F_EQ(*valuePointer, 0.0) << "!0.0001";
579+
580+
var1->value = 0.000009; // Slightly below "closefac"
581+
bnotNode->func(bnotNode, &valuePointer);
582+
EXPECT_PRJM_F_EQ(*valuePointer, 1.0) << "!0.000009";
579583

580584
var1->value = -1.0;
581585
bnotNode->func(bnotNode, &valuePointer);

0 commit comments

Comments
 (0)