diff options
-rw-r--r-- | src/include/util/impl/integral.H | 7 | ||||
-rw-r--r-- | src/usr/testcore/lib/integral.H | 15 | ||||
-rw-r--r-- | src/usr/testcore/lib/makefile | 5 |
3 files changed, 21 insertions, 6 deletions
diff --git a/src/include/util/impl/integral.H b/src/include/util/impl/integral.H index b814e2655..9cc39b222 100644 --- a/src/include/util/impl/integral.H +++ b/src/include/util/impl/integral.H @@ -1,7 +1,7 @@ /* IBM_PROLOG_BEGIN_TAG */ /* This is an automatically generated prolog. */ /* */ -/* $Source: src/include/util/traits/integral.H $ */ +/* $Source: src/include/util/impl/integral.H $ */ /* */ /* OpenPOWER HostBoot Project */ /* */ @@ -38,9 +38,8 @@ namespace std constexpr value_type operator()() const { return value; } }; - struct true_type : integral_constant<bool, true> {}; - struct false_type : integral_constant<bool, false> {}; - + typedef integral_constant<bool, true> true_type; + typedef integral_constant<bool, false> false_type; } #endif /* vim: set filetype=cpp : */ diff --git a/src/usr/testcore/lib/integral.H b/src/usr/testcore/lib/integral.H index 74750582e..bead1c03f 100644 --- a/src/usr/testcore/lib/integral.H +++ b/src/usr/testcore/lib/integral.H @@ -82,6 +82,21 @@ class STLIntegralTest : public CxxTest::TestSuite TS_FAIL("false_type is not false."); } } + + void testTypes() + { + if (!std::is_same<std::true_type, + std::integral_constant<bool, true> >::value) + { + TS_FAIL("true_type and integral_constant<bool, true> are not the same type."); + } + + if (!std::is_same<std::false_type, + std::integral_constant<bool, false> >::value) + { + TS_FAIL("true_type and integral_constant<bool, false> are not the same type."); + } + } }; #endif diff --git a/src/usr/testcore/lib/makefile b/src/usr/testcore/lib/makefile index ea4b74ee4..35c3a3895 100644 --- a/src/usr/testcore/lib/makefile +++ b/src/usr/testcore/lib/makefile @@ -27,11 +27,12 @@ ROOTPATH = ../../../.. MODULE = testsyslib #@TODO-RTC:151185-Turn enable all test cases #TESTS = *.H -TESTS = stltest.H #TODO RTC:204720 #TESTS += synctest.H -TESTS += tls.H +TESTS = stltest.H +TESTS += tls.H +TESTS += integral.H SUBDIRS += runtime.d include ${ROOTPATH}/config.mk |