mirror of
https://github.com/aantron/better-enums.git
synced 2025-12-06 16:56:42 +08:00
Fixed tests
This commit is contained in:
parent
e1341951a2
commit
7ad65be858
@ -369,19 +369,6 @@ class EnumTests : public CxxTest::TestSuite {
|
|||||||
TS_ASSERT_EQUALS(*maybe_depth, +Depth::TrueColor);
|
TS_ASSERT_EQUALS(*maybe_depth, +Depth::TrueColor);
|
||||||
TS_ASSERT(!Channel::_from_index(45));
|
TS_ASSERT(!Channel::_from_index(45));
|
||||||
|
|
||||||
better_enums::optional<Depth> maybe_depth = Depth::_from_index(0);
|
|
||||||
TS_ASSERT(maybe_depth);
|
|
||||||
TS_ASSERT_EQUALS(*maybe_depth, +Depth::HighColor);
|
|
||||||
|
|
||||||
maybe_depth = Depth::_from_index(1);
|
|
||||||
TS_ASSERT(maybe_depth);
|
|
||||||
TS_ASSERT_EQUALS(*maybe_depth, +Depth::TrueColor);
|
|
||||||
TS_ASSERT(!Channel::_from_index(45));
|
|
||||||
|
|
||||||
better_enums::optional<Depth> maybe_depth = Depth::_from_index(0);
|
|
||||||
TS_ASSERT(maybe_depth);
|
|
||||||
TS_ASSERT_EQUALS(*maybe_depth, +Depth::HighColor);
|
|
||||||
|
|
||||||
better_enums::optional<Compression> maybe_compression = Compression::_from_index(0);
|
better_enums::optional<Compression> maybe_compression = Compression::_from_index(0);
|
||||||
TS_ASSERT(maybe_compression);
|
TS_ASSERT(maybe_compression);
|
||||||
TS_ASSERT_EQUALS(*maybe_compression, +Compression::None);
|
TS_ASSERT_EQUALS(*maybe_compression, +Compression::None);
|
||||||
@ -403,7 +390,7 @@ class EnumTests : public CxxTest::TestSuite {
|
|||||||
TS_ASSERT_EQUALS((+Channel::Green), Channel::_from_index_unchecked(1));
|
TS_ASSERT_EQUALS((+Channel::Green), Channel::_from_index_unchecked(1));
|
||||||
TS_ASSERT_EQUALS((+Channel::Blue), Channel::_from_index_unchecked(2));
|
TS_ASSERT_EQUALS((+Channel::Blue), Channel::_from_index_unchecked(2));
|
||||||
|
|
||||||
TS_ASSERT_EQUALS((+Depth::HighColor)), Depth::_from_index_unchecked(0));
|
TS_ASSERT_EQUALS((+Depth::HighColor), Depth::_from_index_unchecked(0));
|
||||||
TS_ASSERT_EQUALS((+Depth::TrueColor), Depth::_from_index_unchecked(1));
|
TS_ASSERT_EQUALS((+Depth::TrueColor), Depth::_from_index_unchecked(1));
|
||||||
|
|
||||||
TS_ASSERT_EQUALS((+Compression::None), Compression::_from_index_unchecked(0));
|
TS_ASSERT_EQUALS((+Compression::None), Compression::_from_index_unchecked(0));
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user