diff options
author | Sven Gothel <[email protected]> | 2021-02-11 15:03:16 +0100 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2021-02-11 15:03:16 +0100 |
commit | 287b32c6328fbebeccc902a26c966ab49a5d6be3 (patch) | |
tree | de997cfac354900a7d5001671a5fb0a98bf14584 | |
parent | 1f1625d72ea2ffa9baf62c508fea88f4688dc39d (diff) |
Unit test test_to_string: Fix 32bit/64bit pointer string comparison testv0.3.1
-rw-r--r-- | test/test_to_string.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/test/test_to_string.cpp b/test/test_to_string.cpp index a08f7c8..45f717b 100644 --- a/test/test_to_string.cpp +++ b/test/test_to_string.cpp @@ -60,7 +60,11 @@ TEST_CASE( "JAU to_string() Test 00 - jau::to_string() std::string conversion", CHECK( "1" == jau::to_string<int>(i1) ); CHECK( "1116791496961" == jau::to_string(u64_1) ); - CHECK( "0x000000000000affe" == jau::to_string(p_v_1) ); + if( sizeof(p_v_1) == 8 ) { + CHECK( "0x000000000000affe" == jau::to_string(p_v_1) ); + } else if( sizeof(p_v_1) == 4 ) { + CHECK( "0x0000affe" == jau::to_string(p_v_1) ); + } CHECK( "1.650000" == jau::to_string(float_1) ); CHECK( "01:04:05:F5:E1:01" == jau::to_string(addr48bit_1) ); |