summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2020-04-26 15:37:36 +0100
committerDan Goodliffe <dan@randomdan.homeip.net>2020-04-26 15:37:36 +0100
commit233bbb7762deb04c20b689a07b721d6ee7678708 (patch)
tree537d474b96a4fce3fac29da3ef8b5c4864f7eb54
parentFix comment in test cases (diff)
downloadslicer-233bbb7762deb04c20b689a07b721d6ee7678708.tar.bz2
slicer-233bbb7762deb04c20b689a07b721d6ee7678708.tar.xz
slicer-233bbb7762deb04c20b689a07b721d6ee7678708.zip
Add test case for external use of enum lookups
Breaks with Clang, that's kinda the point
-rw-r--r--slicer/test/serializers.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/slicer/test/serializers.cpp b/slicer/test/serializers.cpp
index 56fa5ac..0b483b0 100644
--- a/slicer/test/serializers.cpp
+++ b/slicer/test/serializers.cpp
@@ -681,3 +681,9 @@ BOOST_AUTO_TEST_CASE(case_less_test)
BOOST_AUTO_TEST_SUITE_END();
+BOOST_AUTO_TEST_CASE(enum_lookups)
+{
+ BOOST_CHECK_EQUAL("One", Slicer::ModelPartForEnum<TestModule::SomeNumbers>::lookup(TestModule::SomeNumbers::One));
+ BOOST_CHECK_EQUAL(TestModule::SomeNumbers::One, Slicer::ModelPartForEnum<TestModule::SomeNumbers>::lookup("One"));
+}
+