summaryrefslogtreecommitdiffstats
path: root/tests/test_send.c
diff options
context:
space:
mode:
authorChristopher Peplin <chris.peplin@rhubarbtech.com>2014-01-03 13:40:02 -0500
committerChristopher Peplin <chris.peplin@rhubarbtech.com>2014-01-03 13:40:02 -0500
commit330358c978ea3d324740a8dba884c4493fa339b8 (patch)
tree405c6f572531e5624bb15da16bc73da99035503e /tests/test_send.c
parent99dd20fc3d6c14d9e8af65264ad712ca6718dcdd (diff)
Split up functions to rx CAN messages for rx and tx of ISO-TP.
Diffstat (limited to 'tests/test_send.c')
-rw-r--r--tests/test_send.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/tests/test_send.c b/tests/test_send.c
index ca1842a6..7944e6ff 100644
--- a/tests/test_send.c
+++ b/tests/test_send.c
@@ -6,7 +6,6 @@
#include <stdarg.h>
extern IsoTpShims SHIMS;
-extern IsoTpHandle HANDLE;
extern void message_sent(const IsoTpMessage* message, const bool success);
@@ -30,7 +29,7 @@ extern void setup();
START_TEST (test_send_empty_payload)
{
uint16_t arbitration_id = 0x2a;
- IsoTpHandle handle = isotp_send(&SHIMS, arbitration_id, NULL, 0, message_sent);
+ IsoTpSendHandle handle = isotp_send(&SHIMS, arbitration_id, NULL, 0, message_sent);
fail_unless(handle.success);
fail_unless(handle.completed);
ck_assert_int_eq(last_message_sent_arb_id, arbitration_id);
@@ -49,7 +48,7 @@ START_TEST (test_send_single_frame)
{
const uint8_t payload[] = {0x12, 0x34};
uint16_t arbitration_id = 0x2a;
- IsoTpHandle handle = isotp_send(&SHIMS, arbitration_id, payload,
+ IsoTpSendHandle handle = isotp_send(&SHIMS, arbitration_id, payload,
sizeof(payload), message_sent);
ck_assert_int_eq(last_message_sent_arb_id, arbitration_id);
fail_unless(last_message_sent_status);
@@ -71,7 +70,7 @@ START_TEST (test_send_multi_frame)
const uint8_t payload[] = {0x12, 0x34, 0x56, 0x78, 0x90, 0x01, 0x23,
0x45, 0x67, 0x89};
uint16_t arbitration_id = 0x2a;
- IsoTpHandle handle = isotp_send(&SHIMS, arbitration_id, payload, sizeof(payload),
+ IsoTpSendHandle handle = isotp_send(&SHIMS, arbitration_id, payload, sizeof(payload),
message_sent);
fail_unless(handle.completed);
fail_if(handle.success);