diff options
author | 2013-12-29 14:20:12 -0500 | |
---|---|---|
committer | 2013-12-29 14:21:27 -0500 | |
commit | 3a6af99be9a10f795b84a5783939b86d7102fb63 (patch) | |
tree | 237302584675ab0d838f70e52a20f429c7074da7 /tests | |
parent | e5a2a6b9550319cf05c3a3ae93080b17d322078e (diff) |
Standardize function names to snake_case.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/bitfield_tests.c | 16 | ||||
-rw-r--r-- | tests/write_tests.c | 1 |
2 files changed, 8 insertions, 9 deletions
diff --git a/tests/bitfield_tests.c b/tests/bitfield_tests.c index f6287c1..3f54eee 100644 --- a/tests/bitfield_tests.c +++ b/tests/bitfield_tests.c @@ -5,9 +5,9 @@ START_TEST (test_get_byte) { uint8_t data[4] = {0x12, 0x34, 0x56, 0x78}; - uint8_t result = getByte(data, sizeof(data), 0); + uint8_t result = get_byte(data, sizeof(data), 0); ck_assert_int_eq(result, 0x12); - result = getByte(data, sizeof(data), 3); + result = get_byte(data, sizeof(data), 3); ck_assert_int_eq(result, 0x78); } END_TEST @@ -15,11 +15,11 @@ END_TEST START_TEST (test_get_nibble) { uint8_t data[4] = {0x12, 0x34, 0x56, 0x78}; - uint8_t result = getNibble(data, sizeof(data), 0); + uint8_t result = get_nibble(data, sizeof(data), 0); ck_assert_int_eq(result, 0x1); - result = getNibble(data, sizeof(data), 1); + result = get_nibble(data, sizeof(data), 1); ck_assert_int_eq(result, 0x2); - result = getNibble(data, sizeof(data), 2); + result = get_nibble(data, sizeof(data), 2); ck_assert_int_eq(result, 0x3); } END_TEST @@ -28,7 +28,7 @@ START_TEST (test_get_bits_out_of_range) { uint8_t data[4] = {0x12, 0x34, 0x56, 0x78}; uint8_t result[4]; - fail_if(copyBitsRightAligned(data, 4, 25, 16, result, 4)); + fail_if(copy_bits_right_aligned(data, 4, 25, 16, result, 4)); } END_TEST @@ -36,7 +36,7 @@ START_TEST (test_get_bits) { uint8_t data[4] = {0x12, 0x34, 0x56, 0x78}; uint8_t result[4] = {0}; - fail_unless(copyBitsRightAligned(data, 4, 0, 16, result, 4)); + fail_unless(copy_bits_right_aligned(data, 4, 0, 16, result, 4)); ck_assert_int_eq(result[0], 0x12); ck_assert_int_eq(result[1], 0x34); } @@ -46,7 +46,7 @@ START_TEST (test_get_uneven_bits) { uint8_t data[4] = {0x12, 0x34, 0x56, 0x78}; uint8_t result[4] = {0}; - fail_unless(copyBitsRightAligned(data, 4, 4, 12, result, 4)); + fail_unless(copy_bits_right_aligned(data, 4, 4, 12, result, 4)); ck_assert_int_eq(result[0], 0x2); ck_assert_int_eq(result[1], 0x34); } diff --git a/tests/write_tests.c b/tests/write_tests.c index 8cc35e2..4091ac4 100644 --- a/tests/write_tests.c +++ b/tests/write_tests.c @@ -27,7 +27,6 @@ START_TEST (test_encode_bool) ck_assert_int_eq(value, 0x0000000000000000LLU); } END_TEST -// TODO test encode bool Suite* canwriteSuite(void) { Suite* s = suite_create("write"); |