CI updates

This commit is contained in:
Markus F.X.J. Oberhumer
2023-10-27 09:24:06 +02:00
parent 37d393cbc8
commit 6dac3dd248
5 changed files with 25 additions and 6 deletions
+6
View File
@@ -195,11 +195,17 @@ TEST_CASE("TriBool") {
TestTriBool<tribool>::test(false, -1);
//
TestTriBool<TriBool<upx_int8_t> >::test(false, -1);
TestTriBool<TriBool<upx_int16_t> >::test(false, -1);
TestTriBool<TriBool<upx_int32_t> >::test(false, -1);
TestTriBool<TriBool<upx_int64_t> >::test(false, -1);
//
TestTriBool<TriBool<unsigned, 2> >::test(true, 2);
TestTriBool<TriBool<upx_int8_t, 2> >::test(true, 2);
TestTriBool<TriBool<upx_uint8_t, 2> >::test(true, 2);
TestTriBool<TriBool<upx_int16_t, 2> >::test(true, 2);
TestTriBool<TriBool<upx_uint16_t, 2> >::test(true, 2);
TestTriBool<TriBool<upx_int32_t, 2> >::test(true, 2);
TestTriBool<TriBool<upx_uint32_t, 2> >::test(true, 2);
TestTriBool<TriBool<upx_int64_t, 2> >::test(true, 2);
TestTriBool<TriBool<upx_uint64_t, 2> >::test(true, 2);
}
+2
View File
@@ -107,6 +107,8 @@ struct TriBool final {
static_assert(std::is_integral_v<promoted_type>);
static_assert(ThirdValue != 0 && ThirdValue != 1);
enum value_type : underlying_type { False = 0, True = 1, Third = ThirdValue };
static_assert(sizeof(value_type) == sizeof(underlying_type));
static_assert(sizeof(underlying_type) <= sizeof(promoted_type));
// constructors
forceinline constexpr TriBool() noexcept {}
forceinline constexpr TriBool(value_type x) noexcept : value(x) {}