From 75cfe39fa7974d10b925e5e3ab5bd4e3ffab6b54 Mon Sep 17 00:00:00 2001 From: Marcel Holtmann Date: Fri, 24 Jan 2014 21:35:35 -0800 Subject: [PATCH] unit: Check ntoh64 and htob64 against shared conversion functions --- unit/test-lib.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/unit/test-lib.c b/unit/test-lib.c index 8b039cb7a..ef0cffc51 100644 --- a/unit/test-lib.c +++ b/unit/test-lib.c @@ -30,6 +30,8 @@ #include #include +#include "src/shared/util.h" + #include "lib/sdp.h" #include "lib/sdp_lib.h" @@ -38,6 +40,7 @@ static void test_ntoh64(void) uint64_t test = 0x123456789abcdef; g_assert(ntoh64(test) == be64toh(test)); + g_assert(ntoh64(test) == be64_to_cpu(test)); } static void test_hton64(void) @@ -45,6 +48,7 @@ static void test_hton64(void) uint64_t test = 0x123456789abcdef; g_assert(hton64(test) == htobe64(test)); + g_assert(hton64(test) == cpu_to_be64(test)); } static void test_sdp_get_access_protos_valid(void) -- 2.47.3