diff options
author | Christopher Peplin <chris.peplin@rhubarbtech.com> | 2014-01-04 11:12:21 -0500 |
---|---|---|
committer | Christopher Peplin <chris.peplin@rhubarbtech.com> | 2014-01-04 11:12:21 -0500 |
commit | 561145ed1f4f281ce47f3daaf0b1ec033c0b0402 (patch) | |
tree | 7fd23f201801f6659e3bcec0adfaca8713cb08ce /tests | |
parent | 57ea37a8fad405df23256144367b6a18a5ab1580 (diff) |
Standardize names for functions.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/8byte_tests.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/tests/8byte_tests.c b/tests/8byte_tests.c index 12ff417d..51e927e4 100644 --- a/tests/8byte_tests.c +++ b/tests/8byte_tests.c @@ -103,23 +103,23 @@ START_TEST (test_get_off_byte_boundary) START_TEST (test_set_wont_fit) { uint64_t data = 0; - fail_if(set_bit_field(&data, 100, 0, 1)); + fail_if(eightbyte_set_bitfield(&data, 100, 0, 1)); } END_TEST START_TEST (test_set_field) { uint64_t data = 0; - fail_unless(set_bit_field(&data, 1, 0, 1)); + fail_unless(eightbyte_set_bitfield(&data, 1, 0, 1)); uint64_t result = eightbyte_get_bitfield(data, 0, 1, false); ck_assert_int_eq(result, 0x1); data = 0; - fail_unless(set_bit_field(&data, 1, 1, 1)); + fail_unless(eightbyte_set_bitfield(&data, 1, 1, 1)); result = eightbyte_get_bitfield(data, 1, 1, false); ck_assert_int_eq(result, 0x1); data = 0; - fail_unless(set_bit_field(&data, 0xf, 3, 4)); + fail_unless(eightbyte_set_bitfield(&data, 0xf, 3, 4)); result = eightbyte_get_bitfield(data, 3, 4, false); ck_assert_int_eq(result, 0xf); } @@ -128,14 +128,14 @@ END_TEST START_TEST (test_set_doesnt_clobber_existing_data) { uint64_t data = 0xFFFC4DF300000000; - fail_unless(set_bit_field(&data, 0x4fc8, 16, 16)); + fail_unless(eightbyte_set_bitfield(&data, 0x4fc8, 16, 16)); uint64_t result = eightbyte_get_bitfield(data, 16, 16, false); fail_unless(result == 0x4fc8, "Field retrieved in 0x%llx was 0x%llx instead of 0x%x", data, result, 0xc84f); data = 0x8000000000000000; - fail_unless(set_bit_field(&data, 1, 21, 1)); + fail_unless(eightbyte_set_bitfield(&data, 1, 21, 1)); fail_unless(data == 0x8000040000000000LLU, "Expected combined value 0x8000040000000000 but got 0x%llx%llx", data >> 32, data); @@ -145,7 +145,7 @@ END_TEST START_TEST (test_set_off_byte_boundary) { uint64_t data = 0xFFFC4DF300000000; - fail_unless(set_bit_field(&data, 0x12, 12, 8)); + fail_unless(eightbyte_set_bitfield(&data, 0x12, 12, 8)); uint64_t result = eightbyte_get_bitfield(data, 12, 12, false); ck_assert_int_eq(result,0x12d); } @@ -154,14 +154,14 @@ END_TEST START_TEST (test_set_odd_number_of_bits) { uint64_t data = 0xFFFC4DF300000000LLU; - fail_unless(set_bit_field(&data, 0x12, 11, 5)); + fail_unless(eightbyte_set_bitfield(&data, 0x12, 11, 5)); uint64_t result = eightbyte_get_bitfield(data, 11, 5, false); fail_unless(result == 0x12, "Field set in 0x%llx%llx%llx%llx was 0x%llx instead of 0x%llx", data, result, 0x12); data = 0xFFFC4DF300000000LLU; - fail_unless(set_bit_field(&data, 0x2, 11, 5)); + fail_unless(eightbyte_set_bitfield(&data, 0x2, 11, 5)); result = eightbyte_get_bitfield(data, 11, 5, false); fail_unless(result == 0x2, "Field set in 0x%llx%llx%llx%llx was 0x%llx instead of 0x%llx", data, result, |