martinmoene / bit-lite

bit-lite - C++20 bit operations for C++98 and later in a single-file header-only library
Boost Software License 1.0
37 stars 4 forks source link

Tests not passing on big-endian #2

Closed jpcima closed 2 years ago

jpcima commented 2 years ago

Hi, these are failing test results on s390x architecture.

Test project /builddir/build/BUILD/bit-lite-0.1.0/redhat-linux-build
    Start 1: test-cpp98
    Start 2: test-cpp11
1/4 Test #1: test-cpp98 .......................***Failed    0.00 sec
/builddir/build/BUILD/bit-lite-0.1.0/test/bit.t.cpp:357: failed: to_native_endian(): convert native, or little or big endian specified unsigned to native endian [bit.endian.extension]: to_native_endian( uint32_t(0xabcdu) ) == 0xcdab0000u for 43981 == 3450535936
1 out of 21 selected tests failed.

    Start 3: test-cpp14
2/4 Test #2: test-cpp11 .......................***Failed    0.00 sec
/builddir/build/BUILD/bit-lite-0.1.0/test/bit.t.cpp:357: failed: to_native_endian(): convert native, or little or big endian specified unsigned to native endian [bit.endian.extension]: to_native_endian( uint32_t(0xabcdu) ) == 0xcdab0000u for 43981 == 3450535936
1 out of 21 selected tests failed.

    Start 4: test-cpp17
3/4 Test #3: test-cpp14 .......................***Failed    0.00 sec
/builddir/build/BUILD/bit-lite-0.1.0/test/bit.t.cpp:357: failed: to_native_endian(): convert native, or little or big endian specified unsigned to native endian [bit.endian.extension]: to_native_endian( uint32_t(0xabcdu) ) == 0xcdab0000u for 43981 == 3450535936
1 out of 21 selected tests failed.

4/4 Test #4: test-cpp17 .......................***Failed    0.00 sec
/builddir/build/BUILD/bit-lite-0.1.0/test/bit.t.cpp:357: failed: to_native_endian(): convert native, or little or big endian specified unsigned to native endian [bit.endian.extension]: to_native_endian( uint32_t(0xabcdu) ) == 0xcdab0000u for 43981 == 3450535936
1 out of 21 selected tests failed.
jpcima commented 2 years ago

It's good, thanks. For information, it was the last of them, all of nonstd libraries are passing the tests on big-endian machine.

martinmoene commented 2 years ago

@jpcima Wow, thank you so much!