Changeset 1205
- Timestamp:
- 05/07/08 18:38:34 (4 days ago)
- Files:
-
- trunk/Source/System/FieldContainer/Base/OSGFieldContainerTest.cpp (modified) (5 diffs)
- trunk/Source/System/FieldContainer/Base/OSGFieldContainerTypeTest.cpp (modified) (2 diffs)
- trunk/Source/System/FieldContainer/Base/OSGReflexiveContainerTypePredicatesTest.cpp (modified) (1 diff)
- trunk/Source/System/FieldContainer/Misc/OSGContainerCollectionTest.cpp (modified) (5 diffs)
- trunk/Source/System/FieldContainer/Mixins/OSGDynamicAttachmentMixin.h (modified) (1 diff)
- trunk/Source/System/FileIO/OSB/OSGOSBTest.cpp (modified) (6 diffs)
- trunk/Source/System/NodeCores/Drawables/Geometry/Properties/OSGGeoVectorPropertyTest.cpp (modified) (3 diffs)
- trunk/Source/System/NodeCores/Groups/Misc/OSGNodeTest.cpp (modified) (14 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/Source/System/FieldContainer/Base/OSGFieldContainerTest.cpp
r955 r1205 51 51 TEST(refCountAndRefPtr) 52 52 { 53 OSG::Node Ptr np = OSG::Node::create();54 CHECK (np->getRefCount() == 0);55 CHECK (np->getWeakRefCount() == 0);56 57 OSG::UInt32 node_id = getContainerId(np);53 OSG::NodeUnrecPtr np = OSG::Node::create(); 54 CHECK_EQUAL(1, np->getRefCount() ); 55 CHECK_EQUAL(0, np->getWeakRefCount()); 56 57 OSG::UInt32 node_id = np->getId(); 58 58 CHECK(OSG::FieldContainerFactory::the()->getContainer(node_id) == np); 59 59 60 OSG::Node RefPtr r;60 OSG::NodeUnrecPtr r; 61 61 CHECK(!r); 62 62 … … 64 64 CHECK(r); 65 65 CHECK(r.get() == np); 66 CHECK (np->getRefCount() == 1);66 CHECK_EQUAL(2, np->getRefCount()); 67 67 68 68 { 69 OSG::NodeRefPtr r2(np);70 CHECK(r2);71 CHECK(r2.get() == np);72 CHECK(np->getRefCount() == 2);69 OSG::NodeUnrecPtr r2(np); 70 CHECK(r2); 71 CHECK(r2.get() == np); 72 CHECK_EQUAL(3, np->getRefCount()); 73 73 } 74 74 } … … 141 141 { 142 142 // Check to make sure the memory is cleaned up correctly with an FCPtr 143 OSG::Node RefPtr node(OSG::Node::create());144 OSG::UInt32 node_id = OSG::getContainerId(node.get());145 OSG::Int32 ref_count = getRefCount(node.get());143 OSG::NodeUnrecPtr node(OSG::Node::create()); 144 OSG::UInt32 node_id = node->getId(); 145 OSG::Int32 ref_count = node->getRefCount(); 146 146 OSG::commitChanges(); 147 CHECK(OSG::FieldContainerFactory::the()->getContainer(node_id) != OSGNullFC);147 CHECK(OSG::FieldContainerFactory::the()->getContainer(node_id) != NULL); 148 148 149 149 // Now release the ref and check that it was collected 150 node = OSGNullFC;150 node = NULL; 151 151 OSG::commitChanges(); 152 CHECK(OSG::FieldContainerFactory::the()->getContainer(node_id) == OSGNullFC);152 CHECK(OSG::FieldContainerFactory::the()->getContainer(node_id) == NULL); 153 153 } 154 154 … … 160 160 // The idea here is to try to force a subref/addref change using an old 161 161 // entry that would contain invalid data 162 OSG::Node RefPtr outer_node(OSG::Node::create());163 OSG::Node RefPtr outer_node2(OSG::Node::create());162 OSG::NodeUnrecPtr outer_node(OSG::Node::create()); 163 OSG::NodeUnrecPtr outer_node2(OSG::Node::create()); 164 164 for(unsigned i=0;i<100;i++) 165 165 { 166 166 if ((i%5) == 0) 167 { outer_node = OSG::Node RefPtr(OSG::Node::create()); }168 169 OSG::Node RefPtr temp_node = outer_node2;170 OSG::Node RefPtr temp_node2 = outer_node2;167 { outer_node = OSG::NodeUnrecPtr(OSG::Node::create()); } 168 169 OSG::NodeUnrecPtr temp_node = outer_node2; 170 OSG::NodeUnrecPtr temp_node2 = outer_node2; 171 171 172 172 OSG::commitChanges(); … … 234 234 for (unsigned i=0; i<1000;i++) 235 235 { 236 OSG::Node RefPtr n(OSG::Node::create());236 OSG::NodeUnrecPtr n(OSG::Node::create()); 237 237 } 238 238 trunk/Source/System/FieldContainer/Base/OSGFieldContainerTypeTest.cpp
r626 r1205 50 50 TEST(CreateType) 51 51 { 52 OSG::Node Ptr n = OSG::Node::create();52 OSG::NodeUnrecPtr n = OSG::Node::create(); 53 53 OSG::FieldContainerType& n_type(n->getType()); 54 CHECK(n != OSGNullFC);54 CHECK(n != NULL); 55 55 } 56 56 57 57 TEST(GetDocs) 58 58 { 59 OSG::Group Ptr tc = OSG::Group::create();59 OSG::GroupUnrecPtr tc = OSG::Group::create(); 60 60 OSG::FieldContainerType& group_type = tc->getType(); 61 61 … … 69 69 TEST(GetFieldDocs) 70 70 { 71 OSG::Group Ptr tc = OSG::Group::create();71 OSG::GroupUnrecPtr tc = OSG::Group::create(); 72 72 OSG::FieldContainerType& group_type(tc->getType()); 73 73 trunk/Source/System/FieldContainer/Base/OSGReflexiveContainerTypePredicatesTest.cpp
r457 r1205 47 47 48 48 #include <OpenSG/OSGAttachmentContainer.h> 49 #include <OpenSG/OSG FieldContainerAttachment.h>49 #include <OpenSG/OSGAttachment.h> 50 50 #include <OpenSG/OSGNode.h> 51 51 #include <OpenSG/OSGNodeCore.h> trunk/Source/System/FieldContainer/Misc/OSGContainerCollectionTest.cpp
r1184 r1205 39 39 // Unit tests for vec classes 40 40 41 #include <OpenSG/OSGContainer Pool.h>41 #include <OpenSG/OSGContainerCollection.h> 42 42 #include <OpenSG/OSGNode.h> 43 43 #include <OpenSG/OSGGroup.h> … … 46 46 #include <OpenSG/OSGNameAttachment.h> 47 47 48 SUITE(Container PoolTests)48 SUITE(ContainerCollectionTests) 49 49 { 50 50 51 51 TEST(CreatePool) 52 52 { 53 OSG::Container PoolPtr cp = OSG::ContainerPool::create();54 CHECK(c p != OSGNullFC);53 OSG::ContainerCollectionUnrecPtr cc = OSG::ContainerCollection::create(); 54 CHECK(cc != NULL); 55 55 } 56 56 57 57 TEST(SettingName) 58 58 { 59 OSG::Container PoolPtr cp1(OSG::ContainerPool::create()),60 cp2(OSG::ContainerPool::create()),61 cp3(OSG::ContainerPool::create());59 OSG::ContainerCollectionUnrecPtr cc1(OSG::ContainerCollection::create()), 60 cc2(OSG::ContainerCollection::create()), 61 cc3(OSG::ContainerCollection::create()); 62 62 63 CHECK(c p1 != OSGNullFC);64 CHECK(c p2 != OSGNullFC);65 CHECK(c p3 != OSGNullFC);63 CHECK(cc1 != NULL); 64 CHECK(cc2 != NULL); 65 CHECK(cc3 != NULL); 66 66 67 CHECK(c p1 != cp2);68 CHECK(c p1 != cp3);69 CHECK(c p2 != cp3);67 CHECK(cc1 != cc2); 68 CHECK(cc1 != cc3); 69 CHECK(cc2 != cc3); 70 70 71 c p1->setName("cp1");72 c p2->setName("cp2");73 c p3->setName("cp3");71 cc1->setName("cc1"); 72 cc2->setName("cc2"); 73 cc3->setName("cc3"); 74 74 75 CHECK(c p1->getName() == "cp1");76 CHECK(c p2->getName() == "cp2");77 CHECK(c p3->getName() == "cp3");75 CHECK(cc1->getName() == "cc1"); 76 CHECK(cc2->getName() == "cc2"); 77 CHECK(cc3->getName() == "cc3"); 78 78 79 CHECK(c p1->getName() != "cp2");80 CHECK(c p1->getName() != "cp3");79 CHECK(cc1->getName() != "cc2"); 80 CHECK(cc1->getName() != "cc3"); 81 81 } 82 82 … … 84 84 TEST(UsePool) 85 85 { 86 OSG::Container PoolPtr cp = OSG::ContainerPool::create();87 CHECK(c p != OSGNullFC);86 OSG::ContainerCollectionUnrecPtr cc = OSG::ContainerCollection::create(); 87 CHECK(cc != NULL); 88 88 89 OSG::Group Ptr t = OSG::Group ::create();90 OSG::Node Ptr n = OSG::Node ::create();91 OSG::BlendChunk Ptr bc = OSG::BlendChunk::create();89 OSG::GroupUnrecPtr t = OSG::Group ::create(); 90 OSG::NodeUnrecPtr n = OSG::Node ::create(); 91 OSG::BlendChunkUnrecPtr bc = OSG::BlendChunk::create(); 92 92 93 c p->setName("cpcontainer");94 c p->addContainer(t);95 c p->addContainer(n);96 c p->addContainer(bc);93 cc->setName("cc container"); 94 cc->addContainer(t); 95 cc->addContainer(n); 96 cc->addContainer(bc); 97 97 98 CHECK (cp->getNContainers() == 3);99 CHECK (cp->getContainers().size() == 3);98 CHECK_EQUAL(3, cc->getNContainers()); 99 CHECK_EQUAL(3, cc->getMFContainers()->size()); 100 100 101 OSG::FieldContainer Ptr t_ptr = cp->getContainers(0);102 OSG::FieldContainer Ptr n_ptr = cp->getContainers(1);103 OSG::FieldContainer Ptr bc_ptr = cp->getContainers(2);101 OSG::FieldContainerUnrecPtr t_ptr = cc->getContainers(0); 102 OSG::FieldContainerUnrecPtr n_ptr = cc->getContainers(1); 103 OSG::FieldContainerUnrecPtr bc_ptr = cc->getContainers(2); 104 104 105 105 CHECK(true); 106 106 107 107 // Test removal 108 c p->subContainer(t);109 CHECK (cp->getNContainers() == 2);108 cc->subContainer(t); 109 CHECK_EQUAL(2, cc->getNContainers()); 110 110 111 c p->subContainer(n);112 CHECK (cp->getNContainers() == 1);111 cc->subContainer(n); 112 CHECK_EQUAL(1, cc->getNContainers()); 113 113 114 c p->subContainer(bc);115 CHECK (cp->getNContainers() == 0);114 cc->subContainer(bc); 115 CHECK_EQUAL(0, cc->getNContainers()); 116 116 117 117 // Try it as an attachment 118 OSG::Node Ptr root_node = OSG::Node::create();118 OSG::NodeUnrecPtr root_node = OSG::Node::create(); 119 119 120 OSG::Container PoolPtr cp2;121 CHECK(root_node->findAttachment(OSG::Container Pool::getClassType()) == OSGNullFC);120 OSG::ContainerCollectionUnrecPtr cc2; 121 CHECK(root_node->findAttachment(OSG::ContainerCollection::getClassType()) == NULL); 122 122 123 root_node->addAttachment(c p);123 root_node->addAttachment(cc); 124 124 125 125 // now find it 126 c p2 = dynamic_cast<OSG::ContainerPoolPtr>(127 root_node->findAttachment(OSG::Container Pool::getClassType()));128 CHECK(c p2 != OSGNullFC);129 CHECK(c p2 == cp);126 cc2 = dynamic_cast<OSG::ContainerCollection::ObjCPtr>( 127 root_node->findAttachment(OSG::ContainerCollection::getClassType())); 128 CHECK(cc2 != NULL); 129 CHECK(cc2 == cc); 130 130 131 131 // Name it and find it by name 132 OSG::Container PoolPtr named_cp = OSG::ContainerPool::create();133 named_c p->setName("MyPool");132 OSG::ContainerCollectionUnrecPtr named_cc = OSG::ContainerCollection::create(); 133 named_cc->setName("MyPool"); 134 134 135 135 for(unsigned i=0;i<10;i++) … … 137 137 if(i%2) 138 138 { 139 root_node->addAttachment(OSG::ContainerPool::create(), i); 139 OSG::ContainerCollectionUnrecPtr new_cc = 140 OSG::ContainerCollection::create(); 141 142 root_node->addAttachment(new_cc, i); 140 143 } 141 144 } 142 root_node->addAttachment(named_c p, 7);145 root_node->addAttachment(named_cc, 7); 143 146 144 147 unsigned x = 0; 145 OSG::Container PoolPtr cp3(OSGNullFC);148 OSG::ContainerCollectionUnrecPtr cc3(NULL); 146 149 147 while( OSGNullFC == cp3)150 while(NULL == cc3) 148 151 { 149 OSG::Container PoolPtr temp_cp;150 temp_c p = dynamic_cast<OSG::ContainerPoolPtr>(151 root_node->findAttachment(OSG::Container Pool::getClassType(), x));152 if(( OSGNullFC != temp_cp) && (temp_cp->getName() == "MyPool"))152 OSG::ContainerCollectionUnrecPtr temp_cc; 153 temp_cc = dynamic_cast<OSG::ContainerCollection::ObjCPtr>( 154 root_node->findAttachment(OSG::ContainerCollection::getClassType(), x)); 155 if((NULL != temp_cc) && (temp_cc->getName() == "MyPool")) 153 156 { 154 c p3 = temp_cp;155 CHECK(c p3 == named_cp);157 cc3 = temp_cc; 158 CHECK(cc3 == named_cc); 156 159 break; 157 160 } … … 160 163 161 164 CHECK_EQUAL(7, x); 162 CHECK_EQUAL( cp3->getName(), "MyPool");165 CHECK_EQUAL("MyPool", cc3->getName()); 163 166 } 164 167 trunk/Source/System/FieldContainer/Mixins/OSGDynamicAttachmentMixin.h
r1198 r1205 80 80 81 81 OSG_GEN_INTERNALPTR(Self); 82 83 typedef typename AttachmentDescT::ParentPtr ParentPtrType;84 82 85 83 typedef typename Inherited::TypeObject TypeObject; trunk/Source/System/FileIO/OSB/OSGOSBTest.cpp
r956 r1205 70 70 TEST_FIXTURE(FileFixture, CreateOSBFile) 71 71 { 72 OSG::Node Ptr n = OSG::Node::create();72 OSG::NodeUnrecPtr n = OSG::Node::create(); 73 73 n->setCore(OSG::Group::create()); 74 74 … … 77 77 CHECK(bf::exists(test_file)); 78 78 79 OSG::Node Ptr new_n =79 OSG::NodeUnrecPtr new_n = 80 80 OSG::SceneFileHandler::the()->read(test_file.native_file_string().c_str()); 81 CHECK(new_n != OSGNullFC);81 CHECK(new_n != NULL); 82 82 } 83 83 … … 85 85 { 86 86 // Test larger tree 87 OSG::Node Ptr base_node = OSG::Node::create();87 OSG::NodeUnrecPtr base_node = OSG::Node::create(); 88 88 base_node->setCore(OSG::Group::create()); 89 OSG::Node Ptr child_node = OSG::Node::create();89 OSG::NodeUnrecPtr child_node = OSG::Node::create(); 90 90 child_node->setCore(OSG::Group::create()); 91 91 … … 96 96 CHECK(bf::exists(test_file)); 97 97 98 OSG::Node Ptr new_n =98 OSG::NodeUnrecPtr new_n = 99 99 OSG::SceneFileHandler::the()->read(test_file.native_file_string().c_str()); 100 CHECK(new_n != OSGNullFC);101 CHECK(new_n->getCore() != OSGNullFC);100 CHECK(new_n != NULL); 101 CHECK(new_n->getCore() != NULL); 102 102 CHECK(new_n->getNChildren() == 1); 103 CHECK(new_n->getChild(0) != OSGNullFC);104 CHECK(new_n->getChild(0)->getCore() != OSGNullFC);103 CHECK(new_n->getChild(0) != NULL); 104 CHECK(new_n->getChild(0)->getCore() != NULL); 105 105 } 106 106 … … 109 109 { 110 110 std::string start_name("node"); 111 OSG::Node Ptr n = OSG::Node::create();111 OSG::NodeUnrecPtr n = OSG::Node::create(); 112 112 OSG::setName(n, start_name); 113 113 n->setCore(OSG::Group::create()); … … 117 117 CHECK(bf::exists(test_file)); 118 118 119 OSG::Node Ptr new_n =119 OSG::NodeUnrecPtr new_n = 120 120 OSG::SceneFileHandler::the()->read(test_file.native_file_string().c_str()); 121 CHECK(new_n != OSGNullFC);121 CHECK(new_n != NULL); 122 122 CHECK(OSG::getName(new_n) != NULL); 123 123 std::string cur_name = std::string(OSG::getName(new_n)); trunk/Source/System/NodeCores/Drawables/Geometry/Properties/OSGGeoVectorPropertyTest.cpp
r626 r1205 49 49 p3f_1(2.0, 3.0, 4.0), 50 50 p3f_2(3.0, 4.0, 5.0), 51 propP3f( OSGNullFC)51 propP3f() 52 52 { 53 53 propP3f = OSG::GeoPnt3fProperty::create(); … … 66 66 const OSG::Pnt3f p3f_2; 67 67 68 OSG::GeoPnt3fProperty Ptr propP3f;68 OSG::GeoPnt3fPropertyUnrecPtr propP3f; 69 69 }; 70 70 … … 72 72 TEST_FIXTURE(GeoVectorPropertyFixture, GeoVectorProperty_Pnt3f) 73 73 { 74 OSG::GeoVectorProperty Ptr prop = propP3f; // throw away static type info74 OSG::GeoVectorPropertyUnrecPtr prop = propP3f; // throw away static type info 75 75 OSG::Pnt2f p2f; 76 76 OSG::Pnt2d p2d; trunk/Source/System/NodeCores/Groups/Misc/OSGNodeTest.cpp
r877 r1205 41 41 #include <OpenSG/OSGNode.h> 42 42 #include <OpenSG/OSGNameAttachment.h> 43 #include <OpenSG/OSG FieldContainerAttachment.h>43 #include <OpenSG/OSGAttachment.h> 44 44 #include <OpenSG/OSGDynamicAttachmentMixin.h> 45 45 … … 56 56 struct TestAttDesc 57 57 { 58 typedef OSG::FieldContainerAttachment Parent; 59 typedef OSG::FieldContainerAttachmentPtr ParentPtr; 58 typedef OSG::Attachment Parent; 60 59 61 60 // TODO rename it to VRMLGenericAtt ???? … … 63 62 static const OSG::Char8 *getParentTypeName (void) 64 63 { 65 return " FieldContainerAttachment";64 return "Attachment"; 66 65 } 67 66 static const OSG::Char8 *getGroupName (void) { return "TestGenAtt"; } … … 73 72 74 73 typedef OSG::DynFieldAttachment<TestAttDesc> TestAtt; 75 typedef TestAtt::ObjPtr TestAttPtr; 74 typedef TestAtt::ObjTransitPtr TestAttTransitPtr; 75 typedef TestAtt::ObjRecPtr TestAttRecPtr; 76 typedef TestAtt::ObjUnrecPtr TestAttUnrecPtr; 77 typedef TestAtt::ObjWeakPtr TestAttWeakPtr; 76 78 77 79 OSG_DYNFIELDATTACHMENT_INST(TestAttDesc) … … 84 86 TEST(CreateNode) 85 87 { 86 OSG::Node Ptr n = OSG::Node::create();87 CHECK(n != OSGNullFC);88 OSG::NodeUnrecPtr n = OSG::Node::create(); 89 CHECK(n != NULL); 88 90 } 89 91 … … 91 93 TEST(TreeCloningName) 92 94 { 93 OSG::Node Ptr root= OSG::Node::create();94 OSG::Node Ptr child_node = OSG::Node::create();95 OSG::NodeUnrecPtr root = OSG::Node::create(); 96 OSG::NodeUnrecPtr child_node = OSG::Node::create(); 95 97 root->addChild(child_node); 96 98 OSG::setName(root, "root"); 97 99 OSG::setName(child_node, "child_node"); 98 100 99 OSG::Node Ptr new_root = OSG::cloneTree(root);101 OSG::NodeUnrecPtr new_root = OSG::cloneTree(root); 100 102 101 103 CHECK(new_root->getNChildren() == 1); … … 149 151 } 150 152 151 OSG::Group Ptr g01Core;152 OSG::Switch Ptr s01Core;153 OSG::Transform Ptr t01Core;154 OSG::Group Ptr g02Core;155 OSG::Billboard Ptr b01Core;156 OSG::Group Ptr g03Core;157 OSG::Group Ptr g04Core;158 OSG::Billboard Ptr b02Core;159 OSG::Switch Ptr s02Core;160 OSG::Group Ptr g05Core;161 OSG::Group Ptr g06Core;162 163 OSG::Node Ptr g01Node;164 OSG::Node Ptr s01Node;165 OSG::Node Ptr t01Node;166 OSG::Node Ptr g02Node;167 OSG::Node Ptr b01Node;168 OSG::Node Ptr g03Node;169 OSG::Node Ptr g04Node;170 OSG::Node Ptr b02Node;171 OSG::Node Ptr s02Node;172 OSG::Node Ptr g05Node;173 OSG::Node Ptr g06Node;153 OSG::GroupRecPtr g01Core; 154 OSG::SwitchRecPtr s01Core; 155 OSG::TransformRecPtr t01Core; 156 OSG::GroupRecPtr g02Core; 157 OSG::BillboardRecPtr b01Core; 158 OSG::GroupRecPtr g03Core; 159 OSG::GroupRecPtr g04Core; 160 OSG::BillboardRecPtr b02Core; 161 OSG::SwitchRecPtr s02Core; 162 OSG::GroupRecPtr g05Core; 163 OSG::GroupRecPtr g06Core; 164 165 OSG::NodeRecPtr g01Node; 166 OSG::NodeRecPtr s01Node; 167 OSG::NodeRecPtr t01Node; 168 OSG::NodeRecPtr g02Node; 169 OSG::NodeRecPtr b01Node; 170 OSG::NodeRecPtr g03Node; 171 OSG::NodeRecPtr g04Node; 172 OSG::NodeRecPtr b02Node; 173 OSG::NodeRecPtr s02Node; 174 OSG::NodeRecPtr g05Node; 175 OSG::NodeRecPtr g06Node; 174 176 }; 175 177 … … 177 179 { 178 180 // test cloneTree - all shared 179 OSG::Node Ptr clone01 = OSG::cloneTree(g01Node);181 OSG::NodeUnrecPtr clone01 = OSG::cloneTree(g01Node); 180 182 181 183 CHECK(clone01 != g01Node); … … 186 188 187 189 // test cloneTree - clone Switch 188 OSG::Node Ptr clone02 = OSG::cloneTree(g01Node, "Switch", "");190 OSG::NodeUnrecPtr clone02 = OSG::cloneTree(g01Node, "Switch", ""); 189 191 190 192 CHECK(clone02->getCore() == g01Core); … … 196 198 197 199 // test cloneTree - clone Billboard, ignore Switch 198 OSG::Node Ptr clone03 = OSG::cloneTree(g01Node, "Billboard", "Switch");200 OSG::NodeUnrecPtr clone03 = OSG::cloneTree(g01Node, "Billboard", "Switch"); 199 201 200 202 CHECK(clone03->getCore() == g01Core); 201 203 CHECK(clone03->getChild(0)->getChild(0)->getCore() != b01Core); 202 CHECK(clone03->getChild(0)->getCore() == OSGNullFC);204 CHECK(clone03->getChild(0)->getCore() == NULL); 203 205 CHECK(clone03->getChild(2)->getChild(0)->getCore() != b02Core); 204 CHECK(clone03->getChild(2)->getChild(1)->getCore() == OSGNullFC);206 CHECK(clone03->getChild(2)->getChild(1)->getCore() == NULL); 205 207 } 206 208 … … 208 210 { 209 211 // test deepCloneTree - all cloned 210 OSG::Node Ptr clone01 = OSG::deepCloneTree(g01Node);212 OSG::NodeUnrecPtr clone01 = OSG::deepCloneTree(g01Node); 211 213 212 214 CHECK(clone01 != g01Node); … … 220 222 221 223 // test deepCloneTree - share Switch 222 OSG::Node Ptr clone02 = OSG::deepCloneTree(g01Node, "Switch");224 OSG::NodeUnrecPtr clone02 = OSG::deepCloneTree(g01Node, "Switch"); 223 225 224 226 CHECK(clone02->getCore() != g01Core); … … 227 229 228 230 // test deepCloneTree - share Billboard, ignore Switch 229 OSG::Node Ptr clone03 = OSG::deepCloneTree(g01Node, "Billboard", "Switch");231 OSG::NodeUnrecPtr clone03 = OSG::deepCloneTree(g01Node, "Billboard", "Switch"); 230 232 231 233 CHECK(clone03->getCore() != g01Core); 232 CHECK(clone03->getChild(0)->getCore() == OSGNullFC);234 CHECK(clone03->getChild(0)->getCore() == NULL); 233 235 CHECK(clone03->getChild(0)->getChild(0)->getCore() == b01Core); 234 236 CHECK(clone03->getChild(2)->getChild(0)->getCore() == b02Core); 235 CHECK(clone03->getChild(2)->getChild(1)->getCore() == OSGNullFC);237 CHECK(clone03->getChild(2)->getChild(1)->getCore() == NULL); 236 238 } 237 239 238 240 TEST(DynFieldAttachment) 239 241 { 240 OSG::TestAtt Ptr pT = OSG::TestAtt::create();242 OSG::TestAttUnrecPtr pT = OSG::TestAtt::create(); 241 243 242 244 OSG::FieldDescriptionBase *pDesc = NULL; … … 255 257 &OSG::TestAtt::getDynamicField )); 256 258 257 CHECK(pT != OSGNullFC);259 CHECK(pT != NULL); 258 260 259 261 OSG::UInt32 fIndex = pT->addField(*pDesc);
