tests/test-helpers: fix endianness: do not print uint32_t as raw bytes
This unit test would not pass on big-endian machines. Change-Id: I60dbcaa89b031c9a81c35e1dd0d9c963d486014c
This commit is contained in:
parent
89062aeb21
commit
81fd48d741
|
@ -98,8 +98,7 @@ void test_asn1_helpers(void)
|
|||
printf("Decoding back to uint32_t: 0x%x\n", res);
|
||||
ASSERT(res == val1);
|
||||
|
||||
printf("Encoding %s to 24-bit asn.1 bitstring\n",
|
||||
osmo_hexdump_nospc((unsigned char*)&val1, 3));
|
||||
printf("Encoding 0x%x to 24-bit asn.1 bitstring\n", val1);
|
||||
asn1_u24_to_bitstring(&enc, &tmpval, val1);
|
||||
|
||||
ASSERT(enc.size == 24/8);
|
||||
|
|
|
@ -6,7 +6,7 @@ Testing asn.1 helper functions
|
|||
Encoding 0xdeadbeef to asn.1 bitstring
|
||||
Encoded: 20deadbeef
|
||||
Decoding back to uint32_t: 0xdeadbeef
|
||||
Encoding efbead to 24-bit asn.1 bitstring
|
||||
Encoding 0xdeadbeef to 24-bit asn.1 bitstring
|
||||
Encoded: 18adbeef
|
||||
Decoding string from asn.1: 0123456789012345
|
||||
Decoding large string from asn1: 0123456789012345678901234567890
|
||||
|
|
Loading…
Reference in New Issue