summaryrefslogtreecommitdiffstats
path: root/src/usr/testcore/lib/shared_ptr.H
diff options
context:
space:
mode:
Diffstat (limited to 'src/usr/testcore/lib/shared_ptr.H')
-rw-r--r--src/usr/testcore/lib/shared_ptr.H8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/usr/testcore/lib/shared_ptr.H b/src/usr/testcore/lib/shared_ptr.H
index 2e68c5774..6a9f4e76a 100644
--- a/src/usr/testcore/lib/shared_ptr.H
+++ b/src/usr/testcore/lib/shared_ptr.H
@@ -74,12 +74,16 @@ class STLSharedPtrTest : public CxxTest::TestSuite
TS_FAIL("p3 is not unique.");
}
- if (!(p1 == p2))
+ if (p1 == p2)
{
- TS_FAIL("p1 and p2 should be equal");
+ TS_FAIL("p1 and p2 should not be equal pointers");
}
shared_ptr<T1> p4 = static_pointer_cast<T1>(p3);
+ if (p3 != p4)
+ {
+ TS_FAIL("p3 and p4 should be equal pointers");
+ }
if (p3.use_count() != 2)
{
TS_FAIL("p3 is not shared now.");
OpenPOWER on IntegriCloud