|
void
sgTest::rootTest() {
test_init();
sg_root->print_member();
CPPUNIT_ASSERT_EQUAL((float)width/2, sg_root->xyz[0]);
CPPUNIT_ASSERT_EQUAL(0.0f, sg_root->xyz[1]);
CPPUNIT_ASSERT_EQUAL(-100.0f, sg_root->xyz[2]);
}
void
sgTest::childTest() {
while (sg_root) {
if(sg_root->children != NULL) {
sg_root->children->print_member();
...
sg_root = sg_root->children;
} else if(sg_root->brother != NULL) {
sg_root->brother->print_member();
CPPUNIT_ASSERT_EQUAL(0.0f, sg_root->brother->xyz[0]);
...
sg_root = sg_root->brother;
...
|