summaryrefslogtreecommitdiffstats
path: root/src/usr/testcore
diff options
context:
space:
mode:
authorMatt Derksen <v2cibmd@us.ibm.com>2016-05-27 16:32:41 -0500
committerBill Hoffa <wghoffa@us.ibm.com>2016-06-02 09:23:52 -0500
commit3ddbcbd4b81296fa5524331f5313138d1c45d305 (patch)
treec8f3fccea92e4913e2ee68295f9aefe21f63cd52 /src/usr/testcore
parent5c59bb5b9c89a173c6771d4db84abb53f4615d93 (diff)
downloadblackbird-hostboot-3ddbcbd4b81296fa5524331f5313138d1c45d305.tar.gz
blackbird-hostboot-3ddbcbd4b81296fa5524331f5313138d1c45d305.zip
Overloaded != operator for shared_ptr.
Also updated cxxtests to make them pass. Change-Id: I444a9c6c60261755db55fffbed66c92f93965c50 RTC:153697 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/25138 Tested-by: Jenkins Server Tested-by: FSP CI Jenkins Reviewed-by: Christian R. Geddes <crgeddes@us.ibm.com> Reviewed-by: A. P. Williams III <iawillia@us.ibm.com> Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
Diffstat (limited to 'src/usr/testcore')
-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