summaryrefslogtreecommitdiffstats
path: root/src/usr
diff options
context:
space:
mode:
authorPatrick Williams <iawillia@us.ibm.com>2015-11-04 08:09:24 -0600
committerPatrick Williams <iawillia@us.ibm.com>2015-12-11 15:30:27 -0600
commitedb283c78cad6294def01f3a8c77cd79db3f81db (patch)
tree6fcdeb2af6c59960dc54dc30ab31b28b8f87e7c3 /src/usr
parent2b399b960c2299e851d2ba208f486efed24074c8 (diff)
downloadtalos-hostboot-edb283c78cad6294def01f3a8c77cd79db3f81db.tar.gz
talos-hostboot-edb283c78cad6294def01f3a8c77cd79db3f81db.zip
Implement std::is_integral.
RTC: 124148 Change-Id: I01b8f3c1fb27068e0384045c65c271baefd25622 Reviewed-on: http://gfw160.aus.stglabs.ibm.com:8080/gerrit/21796 Tested-by: Jenkins Server Reviewed-by: STEPHEN M. CPREK <smcprek@us.ibm.com> Reviewed-by: Brian Silver <bsilver@us.ibm.com> Reviewed-by: Richard J. Knight <rjknight@us.ibm.com> Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src/usr')
-rw-r--r--src/usr/testcore/lib/is_integral.H70
1 files changed, 70 insertions, 0 deletions
diff --git a/src/usr/testcore/lib/is_integral.H b/src/usr/testcore/lib/is_integral.H
new file mode 100644
index 000000000..250df9552
--- /dev/null
+++ b/src/usr/testcore/lib/is_integral.H
@@ -0,0 +1,70 @@
+/* IBM_PROLOG_BEGIN_TAG */
+/* This is an automatically generated prolog. */
+/* */
+/* $Source: src/usr/testcore/lib/is_integral.H $ */
+/* */
+/* OpenPOWER HostBoot Project */
+/* */
+/* Contributors Listed Below - COPYRIGHT 2015 */
+/* [+] International Business Machines Corp. */
+/* */
+/* */
+/* Licensed under the Apache License, Version 2.0 (the "License"); */
+/* you may not use this file except in compliance with the License. */
+/* You may obtain a copy of the License at */
+/* */
+/* http://www.apache.org/licenses/LICENSE-2.0 */
+/* */
+/* Unless required by applicable law or agreed to in writing, software */
+/* distributed under the License is distributed on an "AS IS" BASIS, */
+/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or */
+/* implied. See the License for the specific language governing */
+/* permissions and limitations under the License. */
+/* */
+/* IBM_PROLOG_END_TAG */
+#ifndef __LIB_IS_INTEGRAL_H
+#define __LIB_IS_INTEGRAL_H
+
+#include <cxxtest/TestSuite.H>
+#include <type_traits>
+
+class STLIsIntegralTest : public CxxTest::TestSuite
+{
+ public:
+ void testIsIntegral()
+ {
+ using namespace std;
+
+ if(!is_integral<bool>::value)
+ {
+ TS_FAIL("is_integral<bool> is false.");
+ }
+ if(!is_integral<const bool>::value)
+ {
+ TS_FAIL("is_integral<const bool> is false.");
+ }
+ if(!is_integral<bool&>::value)
+ {
+ TS_FAIL("is_integral<bool&> is false.");
+ }
+ if(!is_integral<int>::value)
+ {
+ TS_FAIL("is_integral<int> is false.");
+ }
+ if(!is_integral<unsigned int>::value)
+ {
+ TS_FAIL("is_integral<unsigned int> is false.");
+ }
+ if(is_integral<float>::value)
+ {
+ TS_FAIL("is_integral<float> is true.");
+ }
+ if(is_integral<char*>::value)
+ {
+ TS_FAIL("is_integral<char*> is true.");
+ }
+ }
+
+};
+
+#endif
OpenPOWER on IntegriCloud