From e0cf5c1a2bc404684deabd8089108be1c7254f42 Mon Sep 17 00:00:00 2001 From: Gary Talent Date: Sun, 9 Apr 2017 17:15:23 -0500 Subject: [PATCH] Fix nativizeLittleEndian test to work on little endian systems --- src/ox/std/test/CMakeLists.txt | 2 +- src/ox/std/test/byteswap_test.cpp | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/ox/std/test/CMakeLists.txt b/src/ox/std/test/CMakeLists.txt index 66d76eea2..de5fe4044 100644 --- a/src/ox/std/test/CMakeLists.txt +++ b/src/ox/std/test/CMakeLists.txt @@ -40,4 +40,4 @@ add_executable( target_link_libraries(ByteSwapTest OxStd) -add_test("Test\\ nativizeLittleEndian\\ 40\\ ==\\ 671088640" ByteSwapTest "40") +add_test("Test\\ nativizeLittleEndian\\ 40" ByteSwapTest "40") diff --git a/src/ox/std/test/byteswap_test.cpp b/src/ox/std/test/byteswap_test.cpp index 46862e8b7..b7d36d668 100644 --- a/src/ox/std/test/byteswap_test.cpp +++ b/src/ox/std/test/byteswap_test.cpp @@ -17,8 +17,7 @@ map> tests = { { "40", []() { - cout << (nativizeLittleEndian((uint32_t) 40)) << endl; - return !(nativizeLittleEndian((uint32_t) 40) == 671088640); + return !(nativizeLittleEndian(nativizeLittleEndian((uint32_t) 40)) == 40); } }, };