Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Three-valued test for disjunction.
	modified:   c-examples/tests/ExpressionsBoolean_Tests.cpp
  • Loading branch information
Victor Bandur committed Apr 29, 2016
1 parent 375b27a commit 4bfcba9
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions c-examples/tests/ExpressionsBoolean_Tests.cpp
Expand Up @@ -97,6 +97,30 @@ TEST(Expression_Boolean, orExp)
EXPECT_EQ (true,res->value.boolVal);
vdmFree(res);

vdmFree(t);
t = NULL;
res = vdmOr(t, t1);
EXPECT_EQ(NULL, res);
vdmFree(res);

vdmFree(t1);
t = newBool(false);
t1 = NULL;
res = vdmOr(t, t1);
EXPECT_EQ(NULL, res);
vdmFree(res);

t1 = newBool(true);
res = vdmOr(t, t1);
EXPECT_EQ(true, res->value.boolVal);
vdmFree(res);

vdmFree(t);
t = NULL;
res = vdmOr(t1, t);
EXPECT_EQ(true, res->value.boolVal);

vdmFree(res);
vdmFree(t);
vdmFree(t1);
}
Expand Down

0 comments on commit 4bfcba9

Please sign in to comment.