diff options
author | Christopher Peplin <chris.peplin@rhubarbtech.com> | 2014-02-14 18:35:24 -0500 |
---|---|---|
committer | Christopher Peplin <chris.peplin@rhubarbtech.com> | 2014-02-14 18:35:48 -0500 |
commit | 2ec5044b09a9c5ff9ffa1531371cc5095e278d3d (patch) | |
tree | 9bb06b2da94b9045ef765f309263dffb27c616b3 /tests | |
parent | 2e37a1f1000d2ce827a028206e6b42b10536e7b3 (diff) |
Clarify when we are using int vs float and move decoders up a level.
Fixed #4 - the Decoder function type signature actually belonged one
level higher, in the application, since there's no capability of
actually using it in this library at the moment.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test_core.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/test_core.c b/tests/test_core.c index 815954b..30d19f4 100644 --- a/tests/test_core.c +++ b/tests/test_core.c @@ -338,7 +338,7 @@ START_TEST (test_negative_response) } END_TEST -START_TEST (test_payload_to_float) +START_TEST (test_payload_to_integer) { uint16_t arb_id = OBD2_MODE_POWERTRAIN_DIAGNOSTIC_REQUEST; DiagnosticRequestHandle handle = diagnostic_request_pid(&SHIMS, @@ -348,7 +348,7 @@ START_TEST (test_payload_to_float) const uint8_t can_data[] = {0x4, 0x1 + 0x40, 0x2, 0x45, 0x12}; DiagnosticResponse response = diagnostic_receive_can_frame(&SHIMS, &handle, arb_id + 0x8, can_data, sizeof(can_data)); - ck_assert_int_eq(diagnostic_payload_to_float(&response), 0x4512); + ck_assert_int_eq(diagnostic_payload_to_integer(&response), 0x4512); } END_TEST @@ -371,7 +371,7 @@ Suite* testSuite(void) { tcase_add_test(tc_core, test_missing_pid); tcase_add_test(tc_core, test_wrong_pid_then_right_completes); tcase_add_test(tc_core, test_negative_response); - tcase_add_test(tc_core, test_payload_to_float); + tcase_add_test(tc_core, test_payload_to_integer); // TODO these are future work: // TODO test request MIL |