Value Assertions
Compare integers, floating-point numbers, pointers, and booleans.
Assert Macros 🔗
Assert macros fail and abort the test case.
-
#define ASSERT_EQ(X, Y, ...)
Check two integers, floating-point numbers, or pointers to determine if
X
==Y
.
-
#define ASSERT_EQ_APPROX(X, Y, T, ...)
Check two floating-point numbers to determine if
X
≈Y
with the specified tolerance.
-
#define ASSERT_NE(X, Y, ...)
Check two integers, floating-point numbers, or pointers to determine if
X
!=Y
.
-
#define ASSERT_NE_APPROX(X, Y, T, ...)
Check two floating point numbers to determine if
X
≉Y
with the specified tolerance.
-
#define ASSERT_LT(X, Y, ...)
Check two integers, floating-point numbers, or pointers to determine if
X
<Y
.
-
#define ASSERT_LTEQ(X, Y, ...)
Check two integers, floating-point numbers, or pointers to determine if
X
<=Y
.
-
#define ASSERT_GT(X, Y, ...)
Check two integers, floating-point numbers, or pointers to determine if
X
>Y
.
-
#define ASSERT_GTEQ(X, Y, ...)
Check two integers, floating-point numbers, or pointers to determine if
X
>=Y
.
-
#define ASSERT_NULL(X, ...)
Check two pointers to determine if
X
==NULL
.
-
#define ASSERT_NONNULL(X, ...)
Check two pointers to determine if
X
!=NULL
.
-
#define ASSERT_TRUE(X, ...)
Check if
X
asserts as true.
-
#define ASSERT_FALSE(X, ...)
Check if
X
asserts as false.
Expect Macros 🔗
Expect macros fail but do not abort the test case.
-
#define EXPECT_EQ(X, Y, ...)
Check two integers, floating-point numbers, or pointers to determine if
X
==Y
.
-
#define EXPECT_EQ_APPROX(X, Y, T, ...)
Check two floating-point numbers to determine if
X
≈Y
with the specified tolerance.
-
#define EXPECT_NE(X, Y, ...)
Check two integers, floating-point numbers, or pointers to determine if
X
!=Y
.
-
#define EXPECT_NE_APPROX(X, Y, T, ...)
Check two floating point numbers to determine if
X
≉Y
with the specified tolerance.
-
#define EXPECT_LT(X, Y, ...)
Check two integers, floating-point numbers, or pointers to determine if
X
<Y
.
-
#define EXPECT_LTEQ(X, Y, ...)
Check two integers, floating-point numbers, or pointers to determine if
X
<=Y
.
-
#define EXPECT_GT(X, Y, ...)
Check two integers, floating-point numbers, or pointers to determine if
X
>Y
.
-
#define EXPECT_GTEQ(X, Y, ...)
Check two integers, floating-point numbers, or pointers to determine if
X
>=Y
.
-
#define EXPECT_NULL(X, ...)
Check two pointers to determine if
X
==NULL
.
-
#define EXPECT_NONNULL(X, ...)
Check two pointers to determine if
X
!=NULL
.
-
#define EXPECT_TRUE(X, ...)
Check if
X
asserts as true.
-
#define EXPECT_FALSE(X, ...)
Check if
X
asserts as false.