refractor to remove duplicate code between ASSERT_HEX and ASSERT_INT

use static inline min_of and max_of instead of macro
This commit is contained in:
hathach
2013-01-14 00:41:23 +07:00
parent f991475183
commit 3d8babcb14
3 changed files with 43 additions and 25 deletions
+19
View File
@@ -145,6 +145,25 @@ void test_assert_hex_within_greater(void)
TEST_FAIL();
}
//--------------------------------------------------------------------+
// HEX
//--------------------------------------------------------------------+
void test_assert_bin_equal(void)
{
// ASSERT_HEX (0xffee, 0xffee, (void) 0);
// ASSERT_HEX_EQUAL (0xffee, 0xffee, (void) 0);
//
// uint32_t x = 0xf0f0;
// uint32_t y = 0xf0f0;
// ASSERT_HEX (x++, y++, (void) 0); // test side effect
// TEST_ASSERT_EQUAL(0xf0f1, x);
// TEST_ASSERT_EQUAL(0xf0f1, y);
//
// ASSERT_HEX(0x1234, 0x4321, (void) 0);
TEST_IGNORE();
}