@@ -32,12 +32,14 @@ TEST_CASE("as_unsigned (changed)", "[utility]") {
32
32
std::uint32_t >);
33
33
STATIC_REQUIRE (std::is_same_v<decltype (stdx::as_unsigned (std::int64_t {})),
34
34
std::uint64_t >);
35
+ STATIC_REQUIRE (stdx::as_unsigned (std::int8_t {17 }) == 17 );
35
36
}
36
37
37
38
TEMPLATE_TEST_CASE (" as_unsigned (unchanged)" , " [utility]" , std::uint8_t ,
38
39
std::uint16_t , std::uint32_t , std::uint64_t ) {
39
40
STATIC_REQUIRE (
40
41
std::is_same_v<decltype (stdx::as_unsigned (TestType{})), TestType>);
42
+ STATIC_REQUIRE (stdx::as_unsigned (TestType{17 }) == 17 );
41
43
}
42
44
43
45
TEST_CASE (" as_signed (changed)" , " [utility]" ) {
@@ -49,12 +51,14 @@ TEST_CASE("as_signed (changed)", "[utility]") {
49
51
std::int32_t >);
50
52
STATIC_REQUIRE (std::is_same_v<decltype (stdx::as_signed (std::uint64_t {})),
51
53
std::int64_t >);
54
+ STATIC_REQUIRE (stdx::as_signed (std::uint8_t {17 }) == 17 );
52
55
}
53
56
54
57
TEMPLATE_TEST_CASE (" as_signed (unchanged)" , " [utility]" , std::int8_t ,
55
58
std::int16_t , std::int32_t , std::int64_t ) {
56
59
STATIC_REQUIRE (
57
60
std::is_same_v<decltype (stdx::as_signed (TestType{})), TestType>);
61
+ STATIC_REQUIRE (stdx::as_signed (TestType{17 }) == 17 );
58
62
}
59
63
60
64
TEMPLATE_TEST_CASE (" sized<T> in (uint8_t zero/one/two case)" , " [utility]" ,
0 commit comments