UnityAssertionsCheatSheetSuitableforPrintingandPossiblyFraming
BasicFailandIgnore
TEST_FAIL()
TEST_IGNORE()
Boolean
TEST_ASSERT (condition)
TEST_ASSERT_TRUE (condition)
TEST_ASSERT_UNLESS (condition)
TEST_ASSERT_FALSE (condition)
TEST_ASSERT_NULL (pointer)
TEST_ASSERT_NOT_NULL (pointer)
SignedandUnsignedIntegers(ofallsizes)
TEST_ASSERT_EQUAL_INT (exp, act)
TEST_ASSERT_EQUAL_INT8 (exp, act)
TEST_ASSERT_EQUAL_INT16 (exp, act)
TEST_ASSERT_EQUAL_INT32 (exp, act)
TEST_ASSERT_EQUAL_INT64 (exp, act)
TEST_ASSERT_EQUAL (exp, act)
TEST_ASSERT_NOT_EQUAL (exp, act)
TEST_ASSERT_EQUAL_UINT (exp, act)
TEST_ASSERT_EQUAL_UINT8 (exp, act)
TEST_ASSERT_EQUAL_UINT16 (exp, act)
TEST_ASSERT_EQUAL_UINT32 (exp, act)
TEST_ASSERT_EQUAL_UINT64 (exp, act)
UnsignedIntegers(ofallsizes)inHexadecimal
TEST_ASSERT_EQUAL_HEX (exp, act)
TEST_ASSERT_EQUAL_HEX8 (exp, act)
TEST_ASSERT_EQUAL_HEX16 (exp, act)
TEST_ASSERT_EQUAL_HEX32 (exp, act)
TEST_ASSERT_EQUAL_HEX64 (exp, act)
MaskedandBit-levelComparisons
TEST_ASSERT_BITS (mask, exp, act)
TEST_ASSERT_BITS_HIGH (mask, act)
TEST_ASSERT_BITS_LOW (mask, act)
TEST_ASSERT_BIT_HIGH (bit, act)
TEST_ASSERT_BIT_LOW (bit, act)
IntegerRanges(ofallsizes)
TEST_ASSERT_INT_WITHIN (delta, exp, act)
TEST_ASSERT_INT8_WITHIN (delta, exp, act)
TEST_ASSERT_INT16_WITHIN (delta, exp, act)
TEST_ASSERT_INT32_WITHIN (delta, exp, act)
TEST_ASSERT_INT64_WITHIN (delta, exp, act)
TEST_ASSERT_UINT_WITHIN (delta, exp, act)
TEST_ASSERT_UINT8_WITHIN (delta, exp, act)
TEST_ASSERT_UINT16_WITHIN (delta, exp, act)
TEST_ASSERT_UINT32_WITHIN (delta, exp, act)
TEST_ASSERT_UINT64_WITHIN (delta, exp, act)
TEST_ASSERT_HEX_WITHIN (delta, exp, act)
TEST_ASSERT_HEX8_WITHIN (delta, exp, act)
TEST_ASSERT_HEX16_WITHIN (delta, exp, act)
TEST_ASSERT_HEX32_WITHIN (delta, exp, act)
TEST_ASSERT_HEX64_WITHIN (delta, exp, act)
StructsandStrings
TEST_ASSERT_EQUAL_PTR (exp, act)
TEST_ASSERT_EQUAL_STRING (exp, act)
TEST_ASSERT_EQUAL_MEMORY (exp, act, len)
Arrays
TEST_ASSERT_EQUAL_INT_ARRAY (exp, act, elem)
TEST_ASSERT_EQUAL_INT8_ARRAY (exp, act, elem)
TEST_ASSERT_EQUAL_INT16_ARRAY (exp, act, elem)
TEST_ASSERT_EQUAL_INT32_ARRAY (exp, act, elem)
TEST_ASSERT_EQUAL_INT64_ARRAY (exp, act, elem)
TEST_ASSERT_EQUAL_UINT_ARRAY (exp, act, elem)
TEST_ASSERT_EQUAL_UINT8_ARRAY (exp, act, elem)
TEST_ASSERT_EQUAL_UINT16_ARRAY (exp, act, elem)
TEST_ASSERT_EQUAL_UINT32_ARRAY (exp, act, elem)
TEST_ASSERT_EQUAL_UINT64_ARRAY (exp, act, elem)
TEST_ASSERT_EQUAL_HEX_ARRAY (exp, act, elem)
TEST_ASSERT_EQUAL_HEX8_ARRAY (exp, act, elem)
TEST_ASSERT_EQUAL_HEX16_ARRAY (exp, act, elem)
TEST_ASSERT_EQUAL_HEX32_ARRAY (exp, act, elem)
TEST_ASSERT_EQUAL_HEX64_ARRAY (exp, act, elem)
TEST_ASSERT_EQUAL_PTR_ARRAY (exp, act, elem)
TEST_ASSERT_EQUAL_STRING_ARRAY (exp, act, elem)
TEST_ASSERT_EQUAL_MEMORY_ARRAY (exp, act, len,
elem)
EachEqual(ComparingArraystoaSingleVal)
(these follow the pattern of the arrays, but are named like this)
TEST_ASSERT_EACH_EQUAL_INT8 (exp, act, elem)
FloatingPoint(IfEnabled)
TEST_ASSERT_FLOAT_WITHIN (delta, exp, act)
TEST_ASSERT_EQUAL_FLOAT (exp, act)
TEST_ASSERT_EQUAL_FLOAT_ARRAY (exp, act, elem)
TEST_ASSERT_FLOAT_IS_INF (act)
TEST_ASSERT_FLOAT_IS_NEG_INF (act)
TEST_ASSERT_FLOAT_IS_NAN (act)
TEST_ASSERT_FLOAT_IS_DETERMINATE (act)
TEST_ASSERT_FLOAT_IS_NOT_INF (act)
TEST_ASSERT_FLOAT_IS_NOT_NEG_INF (act)
TEST_ASSERT_FLOAT_IS_NOT_NAN (act)
TEST_ASSERT_FLOAT_IS_NOT_DETERMINATE (act)
Double(IfEnabled)
TEST_ASSERT_DOUBLE_WITHIN (delta, exp, act)
TEST_ASSERT_EQUAL_DOUBLE (exp, act)
TEST_ASSERT_EQUAL_DOUBLE_ARRAY (exp, act, elem)
TEST_ASSERT_DOUBLE_IS_INF (act)
TEST_ASSERT_DOUBLE_IS_NEG_INF (act)
TEST_ASSERT_DOUBLE_IS_NAN (act)
TEST_ASSERT_DOUBLE_IS_DETERMINATE (act)
TEST_ASSERT_DOUBLE_IS_NOT_INF (act)
TEST_ASSERT_DOUBLE_IS_NOT_NEG_INF (act)
TEST_ASSERT_DOUBLE_IS_NOT_NAN (act)
TEST_ASSERT_DOUBLE_IS_NOT_DETERMINATE (act)
__________________________________________________________________________
Unity Project - ThrowTheSwitch.org
Mike Karlesky
Mark VanderVoord
评论0