Use appropriate test macros in parse_color_test.cxx and state_machine_test.cxx
- osg::Vec4 objects can't be output to a stream -> use the _NOSTREAM variant of the test macro. - ditto for the NULL... thing -> use SG_CHECK_IS_NULL().
This commit is contained in:
@@ -10,7 +10,7 @@
|
|||||||
|
|
||||||
#define VERIFY_COLOR(str, r, g, b, a) \
|
#define VERIFY_COLOR(str, r, g, b, a) \
|
||||||
SG_VERIFY(simgear::parseColor(str, color)) \
|
SG_VERIFY(simgear::parseColor(str, color)) \
|
||||||
SG_CHECK_EQUAL(color, osg::Vec4(r, g, b, a))
|
SG_CHECK_EQUAL_NOSTREAM(color, osg::Vec4(r, g, b, a))
|
||||||
|
|
||||||
#define VERIFY_NODE_STR(node, str) \
|
#define VERIFY_NODE_STR(node, str) \
|
||||||
SG_CHECK_EQUAL(node.getStringValue(), std::string(str))
|
SG_CHECK_EQUAL(node.getStringValue(), std::string(str))
|
||||||
|
|||||||
@@ -128,7 +128,7 @@ void testBasic()
|
|||||||
SG_CHECK_EQUAL(sm->state()->name(), "b");
|
SG_CHECK_EQUAL(sm->state()->name(), "b");
|
||||||
|
|
||||||
////////////////////////////////////////
|
////////////////////////////////////////
|
||||||
SG_CHECK_EQUAL(sm->findStateByName("foo"), NULL);
|
SG_CHECK_IS_NULL(sm->findStateByName("foo"));
|
||||||
SG_CHECK_EQUAL(sm->indexOfState(StateMachine::State_ptr()), -1);
|
SG_CHECK_EQUAL(sm->indexOfState(StateMachine::State_ptr()), -1);
|
||||||
|
|
||||||
SG_CHECK_EQUAL(sm->stateByIndex(1), stateB);
|
SG_CHECK_EQUAL(sm->stateByIndex(1), stateB);
|
||||||
|
|||||||
Reference in New Issue
Block a user