From 7f7f8a30d0113a773529686f23e58d911af2e3a6 Mon Sep 17 00:00:00 2001 From: John Maddock Date: Thu, 12 Jul 2012 17:21:53 +0000 Subject: [PATCH] Add strongly typed enum test. [SVN r79457] --- test/is_enum_test.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/test/is_enum_test.cpp b/test/is_enum_test.cpp index 386b644..ddf3995 100644 --- a/test/is_enum_test.cpp +++ b/test/is_enum_test.cpp @@ -12,6 +12,15 @@ # include #endif +#ifndef BOOST_NO_SCOPED_ENUMS + +enum class test_enum +{ + a, b +}; + +#endif + TT_TEST_BEGIN(is_enum) BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_enum::value, false); @@ -24,6 +33,9 @@ BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_enum::value, false); BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_enum::value, false); BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_enum::value, false); BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_enum::value, false); +#ifndef BOOST_NO_SCOPED_ENUMS +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_enum::value, true); +#endif TT_TEST_END