diff --git a/test/expected.t.cpp b/test/expected.t.cpp index 5163b0e..6228a77 100644 --- a/test/expected.t.cpp +++ b/test/expected.t.cpp @@ -276,26 +276,35 @@ CASE( "unexpected_type: Allows to move-construct from unexpected_type, non-expli CASE( "unexpected_type: Allows to copy-assign from unexpected_type, default" ) { +#if !nsel_USES_STD_EXPECTED unexpected_type a{ 7 }; unexpected_type b{ 0 }; b = a; EXPECT( b.error() == 7 ); +#else + EXPECT( !!"no assignment for std::unexpected (C++23)." ); +#endif } CASE( "unexpected_type: Allows to move-assign from unexpected_type, default" ) { +#if !nsel_USES_STD_EXPECTED unexpected_type a{ 7 }; unexpected_type b{ 0 }; b = std::move( a ); EXPECT( b.error() == 7 ); +#else + EXPECT( !!"no assignment for std::unexpected (C++23)." ); +#endif } CASE( "unexpected_type: Allows to copy-assign from unexpected_type, converting" ) { +#if !nsel_USES_STD_EXPECTED unexpected_type u{ 7 }; unexpected_type ue{ 0 }; unexpected_type ui{ 0 }; @@ -305,6 +314,9 @@ CASE( "unexpected_type: Allows to copy-assign from unexpected_type, converting" EXPECT( ue.error() == Explicit{7} ); EXPECT( ui.error() == Implicit{7} ); +#else + EXPECT( !!"no assignment for std::unexpected (C++23)." ); +#endif } CASE( "unexpected_type: Allows to move-assign from unexpected, converting" )