diff options
author | Marcel Holtmann <marcel@holtmann.org> | 2014-01-24 21:35:35 -0800 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2014-01-24 21:35:35 -0800 |
commit | 75cfe39fa7974d10b925e5e3ab5bd4e3ffab6b54 (patch) | |
tree | a4df2af899f83c50b5830c59be9eefe3fc1d1ad8 /unit/test-lib.c | |
parent | 51c416390f9c481af8403c470f892ed24a770435 (diff) | |
download | bluez-75cfe39fa7974d10b925e5e3ab5bd4e3ffab6b54.tar.gz |
unit: Check ntoh64 and htob64 against shared conversion functions
Diffstat (limited to 'unit/test-lib.c')
-rw-r--r-- | unit/test-lib.c | 4 |
1 files changed, 4 insertions, 0 deletions
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 <stdlib.h> #include <errno.h> +#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) |