FIx a unit test so that the NULL check happens before the dereference.

This commit is contained in:
Chris Glover
2016-09-29 22:29:35 -04:00
parent b61a7423b7
commit 4459af9532

View File

@ -233,8 +233,8 @@ void diamond_non_virtual()
level1_a* l1a = &inst;
base* b1 = l1a;
level1_b* l1_b = runtime_cast<level1_b*>(b1);
BOOST_TEST_EQ(l1_b->name, "level1_b");
BOOST_TEST_NE(l1_b, (level1_b*)NULL);
BOOST_TEST_EQ(l1_b->name, "level1_b");
}
void boost_shared_ptr()