mirror of
https://github.com/aantron/better-enums.git
synced 2026-02-16 23:29:47 +08:00
...
This commit is contained in:
parent
7ad65be858
commit
a3dca4ff32
@ -330,12 +330,12 @@ class EnumTests : public CxxTest::TestSuite {
|
|||||||
|
|
||||||
void test_from_index()
|
void test_from_index()
|
||||||
{
|
{
|
||||||
TS_ASSERT_EQUALS((+Channel::Red)), Depth::_from_index(0));
|
TS_ASSERT_EQUALS((+Channel::Red), Depth::_from_index(0));
|
||||||
TS_ASSERT_EQUALS((+Channel::Green), Depth::_from_index(1));
|
TS_ASSERT_EQUALS((+Channel::Green), Depth::_from_index(1));
|
||||||
TS_ASSERT_EQUALS((+Channel::Blue), Depth::_from_index(1));
|
TS_ASSERT_EQUALS((+Channel::Blue), Depth::_from_index(1));
|
||||||
TS_ASSERT_THROWS(Channel::_from_index(42), std::runtime_error);
|
TS_ASSERT_THROWS(Channel::_from_index(42), std::runtime_error);
|
||||||
|
|
||||||
TS_ASSERT_EQUALS((+Depth::HighColor)), Depth::_from_index(0));
|
TS_ASSERT_EQUALS((+Depth::HighColor), Depth::_from_index(0));
|
||||||
TS_ASSERT_EQUALS((+Depth::TrueColor), Depth::_from_index(1));
|
TS_ASSERT_EQUALS((+Depth::TrueColor), Depth::_from_index(1));
|
||||||
TS_ASSERT_THROWS(Depth::_from_index(42), std::runtime_error);
|
TS_ASSERT_THROWS(Depth::_from_index(42), std::runtime_error);
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user