diff --git a/test/cxxtest/general.h b/test/cxxtest/general.h index a756adf..7dbef05 100644 --- a/test/cxxtest/general.h +++ b/test/cxxtest/general.h @@ -325,7 +325,7 @@ class EnumTests : public CxxTest::TestSuite { TS_ASSERT_EQUALS((+Compression::None)._to_index(), 0); TS_ASSERT_EQUALS((+Compression::Huffman)._to_index(), 1); - TS_ASSERT_EQUALS((+Compression::Default)._to_index(), 2); +// TS_ASSERT_EQUALS((+Compression::Default)._to_index(), 2); // This won't pass as Compression::Huffman == Compression::Default } void test_from_index() @@ -347,45 +347,45 @@ class EnumTests : public CxxTest::TestSuite { void test_from_index_nothrow() { - better_enums::optional maybe_channel = Channel::_from_index(0); + better_enums::optional maybe_channel = Channel::_from_index_nothrow(0); TS_ASSERT(maybe_channel); TS_ASSERT_EQUALS(*maybe_channel, +Channel::Red); - maybe_channel = Channel::_from_index(1); + maybe_channel = Channel::_from_index_nothrow(1); TS_ASSERT(maybe_channel); TS_ASSERT_EQUALS(*maybe_channel, +Channel::Green); - maybe_channel = Channel::_from_index(2); + maybe_channel = Channel::_from_index_nothrow(2); TS_ASSERT(maybe_channel); TS_ASSERT_EQUALS(*maybe_channel, +Channel::Blue); - maybe_channel = Channel::_from_index(45); + maybe_channel = Channel::_from_index_nothrow(45); TS_ASSERT(!maybe_channel); - better_enums::optional maybe_depth = Depth::_from_index(0); + better_enums::optional maybe_depth = Depth::_from_index_nothrow(0); TS_ASSERT(maybe_depth); TS_ASSERT_EQUALS(*maybe_depth, +Depth::HighColor); - maybe_depth = Depth::_from_index(1); + maybe_depth = Depth::_from_index_nothrow(1); TS_ASSERT(maybe_depth); TS_ASSERT_EQUALS(*maybe_depth, +Depth::TrueColor); - maybe_depth = Depth::_from_index(45); + maybe_depth = Depth::_from_index_nothrow(45); TS_ASSERT(!maybe_depth); - better_enums::optional maybe_compression = Compression::_from_index(0); + better_enums::optional maybe_compression = Compression::_from_index_nothrow(0); TS_ASSERT(maybe_compression); TS_ASSERT_EQUALS(*maybe_compression, +Compression::None); - maybe_compression = Compression::_from_index(1); + maybe_compression = Compression::_from_index_nothrow(1); TS_ASSERT(maybe_compression); TS_ASSERT_EQUALS(*maybe_compression, +Compression::Huffman); - maybe_compression = Compression::_from_index(2); + maybe_compression = Compression::_from_index_nothrow(2); TS_ASSERT(maybe_compression); TS_ASSERT_EQUALS(*maybe_compression, +Compression::Default); - maybe_compression = Compression::_from_index(45); + maybe_compression = Compression::_from_index_nothrow(45); TS_ASSERT(!maybe_compression); }