Turi Create
4.0
|
Assertions. More...
Macros | |
#define | __CHECK(condition) |
#define | ASSERT_TRUE(cond) EXPECT_TRUE(cond) |
#define | ASSERT_FALSE(cond) EXPECT_FALSE(cond) |
#define | __CHECK_EQ(val1, val2) __CHECK_OP(==, val1, val2) |
#define | __CHECK_NE(val1, val2) __CHECK_OP(!=, val1, val2) |
#define | __CHECK_LE(val1, val2) __CHECK_OP(<=, val1, val2) |
#define | __CHECK_LT(val1, val2) __CHECK_OP(< , val1, val2) |
#define | __CHECK_GE(val1, val2) __CHECK_OP(>=, val1, val2) |
#define | __CHECK_GT(val1, val2) __CHECK_OP(> , val1, val2) |
#define | __CHECK_DELTA(val1, val2, delta) |
#define | DASSERT_TRUE(cond) ASSERT_TRUE(cond) |
#define | DASSERT_FALSE(cond) ASSERT_FALSE(cond) |
#define | __DCHECK_EQ(val1, val2) __CHECK_EQ(val1, val2) |
#define | __DCHECK_NE(val1, val2) __CHECK_NE(val1, val2) |
#define | __DCHECK_LE(val1, val2) __CHECK_LE(val1, val2) |
#define | __DCHECK_LT(val1, val2) __CHECK_LT(val1, val2) |
#define | __DCHECK_GE(val1, val2) __CHECK_GE(val1, val2) |
#define | __DCHECK_GT(val1, val2) __CHECK_GT(val1, val2) |
#define | __DCHECK_DELTA(val1, val2, delta) __CHECK_DELTA(val1, val2, delta) |
Assertions.
#define __CHECK | ( | condition | ) |
CHECK dies with a fatal error if condition is not true. It is not controlled by NDEBUG, so the check will be executed regardless of compilation mode.
Definition at line 199 of file assertions.hpp.
#define __CHECK_DELTA | ( | val1, | |
val2, | |||
delta | |||
) |
Expects |val1 - val2| <= delta difference, dies with a fatal error otherwise. Mainly meant for floating point values. ASSERT_DELTA and EXPECT_DELTA
Definition at line 260 of file assertions.hpp.
#define __CHECK_EQ | ( | val1, | |
val2 | |||
) | __CHECK_OP(==, val1, val2) |
Expects val1 == val2, dies with a fatal error otherwise. Synonyms are ASSERT_EQ and EXPECT_EQ.
Definition at line 283 of file assertions.hpp.
#define __CHECK_GE | ( | val1, | |
val2 | |||
) | __CHECK_OP(>=, val1, val2) |
Expects val1 >= val2, dies with a fatal error otherwise. Synonyms are ASSERT_GE and EXPECT_GE
Definition at line 287 of file assertions.hpp.
#define __CHECK_GT | ( | val1, | |
val2 | |||
) | __CHECK_OP(> , val1, val2) |
Expects val1 > val2, dies with a fatal error otherwise. Synonyms are ASSERT_GT and EXPECT_GT
Definition at line 288 of file assertions.hpp.
#define __CHECK_LE | ( | val1, | |
val2 | |||
) | __CHECK_OP(<=, val1, val2) |
Expects val1 <= val2, dies with a fatal error otherwise. Synonyms are ASSERT_LE and EXPECT_LE
Definition at line 285 of file assertions.hpp.
#define __CHECK_LT | ( | val1, | |
val2 | |||
) | __CHECK_OP(< , val1, val2) |
Expects val1 < val2, dies with a fatal error otherwise. Synonyms are ASSERT_LT and EXPECT_LT
Definition at line 286 of file assertions.hpp.
#define __CHECK_NE | ( | val1, | |
val2 | |||
) | __CHECK_OP(!=, val1, val2) |
Expects val1 != val2, dies with a fatal error otherwise. Synonyms are ASSERT_NE and EXPECT_NE
Definition at line 284 of file assertions.hpp.
#define __DCHECK_DELTA | ( | val1, | |
val2, | |||
delta | |||
) | __CHECK_DELTA(val1, val2, delta) |
Like __CHECK_DELTA but is compiled away by NDEBUG. Synonyms are DASSERT_DELTA.
Definition at line 358 of file assertions.hpp.
#define __DCHECK_EQ | ( | val1, | |
val2 | |||
) | __CHECK_EQ(val1, val2) |
Like __CHECK_EQ but is compiled away by NDEBUG. Synonyms are DASSERT_EQ.
Definition at line 357 of file assertions.hpp.
#define __DCHECK_GE | ( | val1, | |
val2 | |||
) | __CHECK_GE(val1, val2) |
Like __CHECK_GE but is compiled away by NDEBUG. Synonyms are DASSERT_GE.
Definition at line 362 of file assertions.hpp.
#define __DCHECK_GT | ( | val1, | |
val2 | |||
) | __CHECK_GT(val1, val2) |
Like __CHECK_GT but is compiled away by NDEBUG. Synonyms are DASSERT_GT.
Definition at line 363 of file assertions.hpp.
#define __DCHECK_LE | ( | val1, | |
val2 | |||
) | __CHECK_LE(val1, val2) |
Like __CHECK_LE but is compiled away by NDEBUG. Synonyms are DASSERT_LE.
Definition at line 360 of file assertions.hpp.
#define __DCHECK_LT | ( | val1, | |
val2 | |||
) | __CHECK_LT(val1, val2) |
Like __CHECK_LT but is compiled away by NDEBUG. Synonyms are DASSERT_LT.
Definition at line 361 of file assertions.hpp.
#define __DCHECK_NE | ( | val1, | |
val2 | |||
) | __CHECK_NE(val1, val2) |
Like __CHECK_NE but is compiled away by NDEBUG. Synonyms are DASSERT_NE.
Definition at line 359 of file assertions.hpp.
#define ASSERT_FALSE | ( | cond | ) | EXPECT_FALSE(cond) |
Expects val to evaluate to false, dies with a fatal error otherwise. Synonyms are EXPECT_FALSE
Definition at line 310 of file assertions.hpp.
#define ASSERT_TRUE | ( | cond | ) | EXPECT_TRUE(cond) |
Expects val to evaluate to true, dies with a fatal error otherwise. Synonyms are EXPECT_TRUE
Definition at line 309 of file assertions.hpp.
#define DASSERT_FALSE | ( | cond | ) | ASSERT_FALSE(cond) |
Like ASSERT_FALSE but is compiled away by NDEBUG.
Definition at line 365 of file assertions.hpp.
#define DASSERT_TRUE | ( | cond | ) | ASSERT_TRUE(cond) |
Like ASSERT_TRUE but is compiled away by NDEBUG.
Definition at line 364 of file assertions.hpp.