Skip to content

Commit 6fb0fd6

Browse files
authored
Fix span-lite tests on big-endian (#76, thanks @jpcima)
@jpcima thank you so much, this is very helpful.
1 parent c5bde7a commit 6fb0fd6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

test/span.t.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -1689,7 +1689,7 @@ CASE( "byte_span() [span_FEATURE_BYTE_SPAN=1]" )
16891689
CASE( "byte_span(): Allows building a span of std::byte from a single object (C++17, byte-lite)" )
16901690
{
16911691
#if span_CPP11_OR_GREATER && ( span_HAVE( BYTE ) || span_HAVE( NONSTD_BYTE ) )
1692-
int x = (std::numeric_limits<int>::max)();
1692+
int x = ~0;
16931693

16941694
span<xstd::byte> spn = byte_span( x );
16951695

@@ -1707,7 +1707,7 @@ CASE( "byte_span(): Allows building a span of std::byte from a single object (C+
17071707
CASE( "byte_span(): Allows building a span of const std::byte from a single const object (C++17, byte-lite)" )
17081708
{
17091709
#if span_CPP11_OR_GREATER && ( span_HAVE( BYTE ) || span_HAVE( NONSTD_BYTE ) )
1710-
const int x = (std::numeric_limits<int>::max)();
1710+
const int x = ~0;
17111711

17121712
span<const xstd::byte> spn = byte_span( x );
17131713

0 commit comments

Comments
 (0)