aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <holger@moiji-mobile.com>2015-03-24 19:01:40 +0100
committerHolger Hans Peter Freyther <holger@moiji-mobile.com>2015-03-24 19:07:02 +0100
commit0a8308764c6e1a309842629b23e6ed17cfc755c7 (patch)
tree53fd78d763be7f2f4a1a64f418b5e53f1f14960b /tests
parent953d4eda472c7b28b1f5d24dbd71247a80c0f08b (diff)
mtp: Implement reading the OPC/DPC for little endian
Diffstat (limited to 'tests')
-rw-r--r--tests/mtp/mtp_parse_test.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/mtp/mtp_parse_test.c b/tests/mtp/mtp_parse_test.c
index 0e38077..80f1e4b 100644
--- a/tests/mtp/mtp_parse_test.c
+++ b/tests/mtp/mtp_parse_test.c
@@ -599,6 +599,16 @@ int main(int argc, char **argv)
check_prohib(tests[i].input, &tests[i].prohib);
}
+ if (MTP_READ_OPC(tests[0].hdr.addr) != 91) {
+ fprintf(stderr, "Failed to read OPC address\n");
+ abort();
+ }
+
+ if (MTP_READ_DPC(tests[1].hdr.addr) != 136) {
+ fprintf(stderr, "Failed to read DPC address\n");
+ abort();
+ }
+
/* check the SCCP unitdata */
{
struct sccp_con_ctrl_prt_mgt prt = {