summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorChristopher Peplin <chris.peplin@rhubarbtech.com>2014-01-17 15:56:34 -0500
committerChristopher Peplin <chris.peplin@rhubarbtech.com>2014-01-17 15:56:34 -0500
commit6ebad2aac3ba2f0d7ff5e37c5db4e5b9549247e2 (patch)
treefcec8eae39587e50054fb627eee3662acb7809b3 /tests
parent648c2f77afd1dadce1c01de3f1dc42b54da656d0 (diff)
Mark whether a PID is present in response.
Diffstat (limited to 'tests')
-rw-r--r--tests/test_core.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/tests/test_core.c b/tests/test_core.c
index 182f268b..1ab94094 100644
--- a/tests/test_core.c
+++ b/tests/test_core.c
@@ -84,7 +84,7 @@ START_TEST (test_send_functional_request)
ck_assert_int_eq(last_response_received.arbitration_id,
filter);
ck_assert_int_eq(last_response_received.mode, request.mode);
- ck_assert_int_eq(last_response_received.pid, 0);
+ fail_if(last_response_received.has_pid);
ck_assert_int_eq(last_response_received.payload_length, 1);
ck_assert_int_eq(last_response_received.payload[0], can_data[2]);
}
@@ -116,7 +116,7 @@ START_TEST (test_send_diag_request)
ck_assert_int_eq(last_response_received.arbitration_id,
request.arbitration_id + 0x8);
ck_assert_int_eq(last_response_received.mode, request.mode);
- ck_assert_int_eq(last_response_received.pid, 0);
+ fail_if(last_response_received.has_pid);
ck_assert_int_eq(last_response_received.payload_length, 1);
ck_assert_int_eq(last_response_received.payload[0], can_data[2]);
}
@@ -137,6 +137,7 @@ START_TEST (test_request_pid_standard)
ck_assert_int_eq(last_response_received.arbitration_id,
arb_id + 0x8);
ck_assert_int_eq(last_response_received.mode, 0x1);
+ fail_unless(last_response_received.has_pid);
ck_assert_int_eq(last_response_received.pid, 0x2);
ck_assert_int_eq(last_response_received.payload_length, 1);
ck_assert_int_eq(last_response_received.payload[0], can_data[3]);
@@ -158,6 +159,7 @@ START_TEST (test_request_pid_enhanced)
ck_assert_int_eq(last_response_received.arbitration_id,
arb_id + 0x8);
ck_assert_int_eq(last_response_received.mode, 0x22);
+ fail_unless(last_response_received.has_pid);
ck_assert_int_eq(last_response_received.pid, 0x2);
ck_assert_int_eq(last_response_received.payload_length, 1);
ck_assert_int_eq(last_response_received.payload[0], can_data[4]);