aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorVadim Yanitskiy <axilirator@gmail.com>2020-04-07 21:05:31 +0700
committerVadim Yanitskiy <axilirator@gmail.com>2020-04-07 21:05:37 +0700
commit81fd48d741c5040ed9b787d32619129e20d07224 (patch)
treef1f415dc783bc7531bea543cb70e80932005fc3e /src
parent89062aeb21e42028a7db6b326088e96c835c6b72 (diff)
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
Diffstat (limited to 'src')
-rw-r--r--src/tests/test-helpers.c3
-rw-r--r--src/tests/test-helpers.ok2
2 files changed, 2 insertions, 3 deletions
diff --git a/src/tests/test-helpers.c b/src/tests/test-helpers.c
index d7ad758..08236fa 100644
--- a/src/tests/test-helpers.c
+++ b/src/tests/test-helpers.c
@@ -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);
diff --git a/src/tests/test-helpers.ok b/src/tests/test-helpers.ok
index ddfea78..f2e466f 100644
--- a/src/tests/test-helpers.ok
+++ b/src/tests/test-helpers.ok
@@ -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