|
|
|
@ -289,19 +289,19 @@ void ColorTest::hsvAlpha() { |
|
|
|
|
|
|
|
|
|
|
|
void ColorTest::swizzleType() { |
|
|
|
void ColorTest::swizzleType() { |
|
|
|
constexpr Color3 origColor3; |
|
|
|
constexpr Color3 origColor3; |
|
|
|
constexpr BasicColor4<UnsignedByte> origColor4; |
|
|
|
constexpr Color4ub origColor4; |
|
|
|
|
|
|
|
|
|
|
|
constexpr auto a = Math::swizzle<'y', 'z', 'r'>(origColor3); |
|
|
|
constexpr auto a = Math::swizzle<'y', 'z', 'r'>(origColor3); |
|
|
|
CORRADE_VERIFY((std::is_same<decltype(a), const Color3>::value)); |
|
|
|
CORRADE_VERIFY((std::is_same<decltype(a), const Color3>::value)); |
|
|
|
|
|
|
|
|
|
|
|
constexpr auto b = Math::swizzle<'y', 'z', 'a'>(origColor4); |
|
|
|
constexpr auto b = Math::swizzle<'y', 'z', 'a'>(origColor4); |
|
|
|
CORRADE_VERIFY((std::is_same<decltype(b), const BasicColor3<UnsignedByte>>::value)); |
|
|
|
CORRADE_VERIFY((std::is_same<decltype(b), const Color3ub>::value)); |
|
|
|
|
|
|
|
|
|
|
|
constexpr auto c = Math::swizzle<'y', 'z', 'y', 'x'>(origColor3); |
|
|
|
constexpr auto c = Math::swizzle<'y', 'z', 'y', 'x'>(origColor3); |
|
|
|
CORRADE_VERIFY((std::is_same<decltype(c), const Color4>::value)); |
|
|
|
CORRADE_VERIFY((std::is_same<decltype(c), const Color4>::value)); |
|
|
|
|
|
|
|
|
|
|
|
constexpr auto d = Math::swizzle<'y', 'a', 'y', 'x'>(origColor4); |
|
|
|
constexpr auto d = Math::swizzle<'y', 'a', 'y', 'x'>(origColor4); |
|
|
|
CORRADE_VERIFY((std::is_same<decltype(d), const BasicColor4<UnsignedByte>>::value)); |
|
|
|
CORRADE_VERIFY((std::is_same<decltype(d), const Color4ub>::value)); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
void ColorTest::debug() { |
|
|
|
void ColorTest::debug() { |
|
|
|
|