summaryrefslogtreecommitdiffstats
path: root/src/usr/testcore/lib/stltest.H
diff options
context:
space:
mode:
Diffstat (limited to 'src/usr/testcore/lib/stltest.H')
-rw-r--r--src/usr/testcore/lib/stltest.H20
1 files changed, 19 insertions, 1 deletions
diff --git a/src/usr/testcore/lib/stltest.H b/src/usr/testcore/lib/stltest.H
index 227a3f5c7..c16354ff3 100644
--- a/src/usr/testcore/lib/stltest.H
+++ b/src/usr/testcore/lib/stltest.H
@@ -5,7 +5,7 @@
/* */
/* OpenPOWER HostBoot Project */
/* */
-/* Contributors Listed Below - COPYRIGHT 2011,2016 */
+/* Contributors Listed Below - COPYRIGHT 2011,2017 */
/* [+] International Business Machines Corp. */
/* */
/* */
@@ -95,6 +95,12 @@ class STLTest : public CxxTest::TestSuite
mymap[v5].value());
}
+ if (v5.value() != mymap.at(v5).value()) // map::at value
+ {
+ TS_FAIL("map::at() returned wrong value %d",
+ mymap.at(v5).value());
+ }
+
// test map::insert(v), map::insert(h,v), lower_bound()
mymap.insert(std::map<V,V>::value_type(v2,v2)); //map::insert(v);
@@ -483,6 +489,18 @@ class STLTest : public CxxTest::TestSuite
std::list< std::list<int> > l = { {},{1},{1,2,3} };
std::array<int, 5> a1 { {1,2,3,4,5} };
std::array<int, 5> a2 = {1,2,3,4,5};
+ std::map<int, int> m = {
+ {1, 100},
+ {2, 100},
+ {3, 100},
+ {4, 100},
+ };
+
+ if (m.size() != 4)
+ {
+ TS_FAIL("testInitListCompile(): std::map has an incorrect size after list initialization");
+ }
+
// Compiler warns that std::arrays are unused, so compare their
// sizes
if (a1.size() != a2.size())
OpenPOWER on IntegriCloud