Changeset 1205

Show
Ignore:
Timestamp:
05/07/08 18:38:34 (4 days ago)
Author:
cneumann
Message:

fixed: make the unittests compile/run (at least on linux)

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/Source/System/FieldContainer/Base/OSGFieldContainerTest.cpp

    r955 r1205  
    5151TEST(refCountAndRefPtr) 
    5252{ 
    53     OSG::NodePtr 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(); 
    5858    CHECK(OSG::FieldContainerFactory::the()->getContainer(node_id) == np); 
    5959 
    60     OSG::NodeRefPtr r; 
     60    OSG::NodeUnrecPtr r; 
    6161    CHECK(!r); 
    6262 
     
    6464    CHECK(r); 
    6565    CHECK(r.get() == np); 
    66     CHECK(np->getRefCount() == 1); 
     66    CHECK_EQUAL(2, np->getRefCount()); 
    6767 
    6868    { 
    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()); 
    7373    } 
    7474} 
     
    141141{ 
    142142   // Check to make sure the memory is cleaned up correctly with an FCPtr 
    143    OSG::NodeRefPtr  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(); 
    146146   OSG::commitChanges(); 
    147    CHECK(OSG::FieldContainerFactory::the()->getContainer(node_id) != OSGNullFC); 
     147   CHECK(OSG::FieldContainerFactory::the()->getContainer(node_id) != NULL); 
    148148 
    149149   // Now release the ref and check that it was collected 
    150    node = OSGNullFC
     150   node = NULL
    151151   OSG::commitChanges(); 
    152    CHECK(OSG::FieldContainerFactory::the()->getContainer(node_id) == OSGNullFC); 
     152   CHECK(OSG::FieldContainerFactory::the()->getContainer(node_id) == NULL); 
    153153} 
    154154 
     
    160160   // The idea here is to try to force a subref/addref change using an old 
    161161   // entry that would contain invalid data 
    162    OSG::NodeRefPtr outer_node(OSG::Node::create()); 
    163    OSG::NodeRefPtr outer_node2(OSG::Node::create()); 
     162   OSG::NodeUnrecPtr outer_node(OSG::Node::create()); 
     163   OSG::NodeUnrecPtr outer_node2(OSG::Node::create()); 
    164164   for(unsigned i=0;i<100;i++) 
    165165   { 
    166166      if ((i%5) == 0) 
    167       { outer_node = OSG::NodeRefPtr(OSG::Node::create()); } 
    168  
    169       OSG::NodeRefPtr temp_node = outer_node2; 
    170       OSG::NodeRefPtr 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; 
    171171 
    172172      OSG::commitChanges(); 
     
    234234   for (unsigned i=0; i<1000;i++) 
    235235   { 
    236       OSG::NodeRefPtr       n(OSG::Node::create()); 
     236      OSG::NodeUnrecPtr       n(OSG::Node::create()); 
    237237   } 
    238238 
  • trunk/Source/System/FieldContainer/Base/OSGFieldContainerTypeTest.cpp

    r626 r1205  
    5050TEST(CreateType) 
    5151{ 
    52    OSG::NodePtr n = OSG::Node::create(); 
     52   OSG::NodeUnrecPtr n = OSG::Node::create(); 
    5353   OSG::FieldContainerType& n_type(n->getType()); 
    54    CHECK(n != OSGNullFC); 
     54   CHECK(n != NULL); 
    5555} 
    5656 
    5757TEST(GetDocs) 
    5858{ 
    59    OSG::GroupPtr tc = OSG::Group::create(); 
     59   OSG::GroupUnrecPtr tc = OSG::Group::create(); 
    6060   OSG::FieldContainerType& group_type = tc->getType(); 
    6161 
     
    6969TEST(GetFieldDocs) 
    7070{ 
    71    OSG::GroupPtr tc = OSG::Group::create(); 
     71   OSG::GroupUnrecPtr tc = OSG::Group::create(); 
    7272   OSG::FieldContainerType& group_type(tc->getType()); 
    7373 
  • trunk/Source/System/FieldContainer/Base/OSGReflexiveContainerTypePredicatesTest.cpp

    r457 r1205  
    4747 
    4848#include <OpenSG/OSGAttachmentContainer.h> 
    49 #include <OpenSG/OSGFieldContainerAttachment.h> 
     49#include <OpenSG/OSGAttachment.h> 
    5050#include <OpenSG/OSGNode.h> 
    5151#include <OpenSG/OSGNodeCore.h> 
  • trunk/Source/System/FieldContainer/Misc/OSGContainerCollectionTest.cpp

    r1184 r1205  
    3939// Unit tests for vec classes 
    4040 
    41 #include <OpenSG/OSGContainerPool.h> 
     41#include <OpenSG/OSGContainerCollection.h> 
    4242#include <OpenSG/OSGNode.h> 
    4343#include <OpenSG/OSGGroup.h> 
     
    4646#include <OpenSG/OSGNameAttachment.h> 
    4747 
    48 SUITE(ContainerPoolTests) 
     48SUITE(ContainerCollectionTests) 
    4949{ 
    5050 
    5151TEST(CreatePool) 
    5252{ 
    53     OSG::ContainerPoolPtr cp = OSG::ContainerPool::create(); 
    54     CHECK(cp != OSGNullFC); 
     53    OSG::ContainerCollectionUnrecPtr cc = OSG::ContainerCollection::create(); 
     54    CHECK(cc != NULL); 
    5555} 
    5656 
    5757TEST(SettingName) 
    5858{ 
    59     OSG::ContainerPoolPtr 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()); 
    6262     
    63     CHECK(cp1 != OSGNullFC); 
    64     CHECK(cp2 != OSGNullFC); 
    65     CHECK(cp3 != OSGNullFC); 
     63    CHECK(cc1 != NULL); 
     64    CHECK(cc2 != NULL); 
     65    CHECK(cc3 != NULL); 
    6666     
    67     CHECK(cp1 != cp2); 
    68     CHECK(cp1 != cp3); 
    69     CHECK(cp2 != cp3); 
     67    CHECK(cc1 != cc2); 
     68    CHECK(cc1 != cc3); 
     69    CHECK(cc2 != cc3); 
    7070     
    71     cp1->setName("cp1"); 
    72     cp2->setName("cp2"); 
    73     cp3->setName("cp3"); 
     71    cc1->setName("cc1"); 
     72    cc2->setName("cc2"); 
     73    cc3->setName("cc3"); 
    7474     
    75     CHECK(cp1->getName() == "cp1"); 
    76     CHECK(cp2->getName() == "cp2"); 
    77     CHECK(cp3->getName() == "cp3"); 
     75    CHECK(cc1->getName() == "cc1"); 
     76    CHECK(cc2->getName() == "cc2"); 
     77    CHECK(cc3->getName() == "cc3"); 
    7878     
    79     CHECK(cp1->getName() != "cp2"); 
    80     CHECK(cp1->getName() != "cp3"); 
     79    CHECK(cc1->getName() != "cc2"); 
     80    CHECK(cc1->getName() != "cc3"); 
    8181} 
    8282 
     
    8484TEST(UsePool) 
    8585{ 
    86     OSG::ContainerPoolPtr cp = OSG::ContainerPool::create(); 
    87     CHECK(cp != OSGNullFC); 
     86    OSG::ContainerCollectionUnrecPtr cc = OSG::ContainerCollection::create(); 
     87    CHECK(cc != NULL); 
    8888     
    89     OSG::GroupPtr      t  = OSG::Group     ::create(); 
    90     OSG::NodePtr       n  = OSG::Node      ::create(); 
    91     OSG::BlendChunkPtr 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(); 
    9292     
    93     cp->setName("cp container"); 
    94     cp->addContainer(t); 
    95     cp->addContainer(n); 
    96     cp->addContainer(bc); 
     93    cc->setName("cc container"); 
     94    cc->addContainer(t); 
     95    cc->addContainer(n); 
     96    cc->addContainer(bc); 
    9797     
    98     CHECK(cp->getNContainers() == 3); 
    99     CHECK(cp->getContainers().size() == 3); 
     98    CHECK_EQUAL(3, cc->getNContainers()); 
     99    CHECK_EQUAL(3, cc->getMFContainers()->size()); 
    100100     
    101     OSG::FieldContainerPtr t_ptr  = cp->getContainers(0); 
    102     OSG::FieldContainerPtr n_ptr  = cp->getContainers(1); 
    103     OSG::FieldContainerPtr 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); 
    104104     
    105105    CHECK(true); 
    106106     
    107107    // Test removal 
    108     cp->subContainer(t); 
    109     CHECK(cp->getNContainers() == 2); 
     108    cc->subContainer(t); 
     109    CHECK_EQUAL(2, cc->getNContainers()); 
    110110     
    111     cp->subContainer(n); 
    112     CHECK(cp->getNContainers() == 1); 
     111    cc->subContainer(n); 
     112    CHECK_EQUAL(1, cc->getNContainers()); 
    113113     
    114     cp->subContainer(bc); 
    115     CHECK(cp->getNContainers() == 0); 
     114    cc->subContainer(bc); 
     115    CHECK_EQUAL(0, cc->getNContainers()); 
    116116     
    117117    // Try it as an attachment 
    118     OSG::NodePtr root_node = OSG::Node::create(); 
     118    OSG::NodeUnrecPtr root_node = OSG::Node::create(); 
    119119     
    120     OSG::ContainerPoolPtr cp2; 
    121     CHECK(root_node->findAttachment(OSG::ContainerPool::getClassType()) == OSGNullFC); 
     120    OSG::ContainerCollectionUnrecPtr cc2; 
     121    CHECK(root_node->findAttachment(OSG::ContainerCollection::getClassType()) == NULL); 
    122122     
    123     root_node->addAttachment(cp); 
     123    root_node->addAttachment(cc); 
    124124     
    125125    // now find it 
    126     cp2 = dynamic_cast<OSG::ContainerPoolPtr>( 
    127             root_node->findAttachment(OSG::ContainerPool::getClassType())); 
    128     CHECK(cp2 != OSGNullFC); 
    129     CHECK(cp2 == cp); 
     126    cc2 = dynamic_cast<OSG::ContainerCollection::ObjCPtr>( 
     127            root_node->findAttachment(OSG::ContainerCollection::getClassType())); 
     128    CHECK(cc2 != NULL); 
     129    CHECK(cc2 == cc); 
    130130     
    131131    // Name it and find it by name 
    132     OSG::ContainerPoolPtr named_cp = OSG::ContainerPool::create(); 
    133     named_cp->setName("MyPool"); 
     132    OSG::ContainerCollectionUnrecPtr named_cc = OSG::ContainerCollection::create(); 
     133    named_cc->setName("MyPool"); 
    134134     
    135135    for(unsigned i=0;i<10;i++) 
     
    137137        if(i%2) 
    138138        { 
    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); 
    140143        } 
    141144    } 
    142     root_node->addAttachment(named_cp, 7); 
     145    root_node->addAttachment(named_cc, 7); 
    143146     
    144147    unsigned x = 0; 
    145     OSG::ContainerPoolPtr cp3(OSGNullFC); 
     148    OSG::ContainerCollectionUnrecPtr cc3(NULL); 
    146149     
    147     while(OSGNullFC == cp3) 
     150    while(NULL == cc3) 
    148151    { 
    149         OSG::ContainerPoolPtr temp_cp
    150         temp_cp = dynamic_cast<OSG::ContainerPoolPtr>( 
    151                 root_node->findAttachment(OSG::ContainerPool::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")) 
    153156        { 
    154             cp3 = temp_cp
    155             CHECK(cp3 == named_cp); 
     157            cc3 = temp_cc
     158            CHECK(cc3 == named_cc); 
    156159            break; 
    157160        } 
     
    160163     
    161164    CHECK_EQUAL(7, x); 
    162     CHECK_EQUAL(cp3->getName(), "MyPool"); 
     165    CHECK_EQUAL("MyPool", cc3->getName()); 
    163166} 
    164167 
  • trunk/Source/System/FieldContainer/Mixins/OSGDynamicAttachmentMixin.h

    r1198 r1205  
    8080 
    8181    OSG_GEN_INTERNALPTR(Self); 
    82  
    83     typedef typename AttachmentDescT::ParentPtr           ParentPtrType; 
    8482 
    8583    typedef typename Inherited::TypeObject                TypeObject; 
  • trunk/Source/System/FileIO/OSB/OSGOSBTest.cpp

    r956 r1205  
    7070TEST_FIXTURE(FileFixture, CreateOSBFile) 
    7171{ 
    72    OSG::NodePtr n = OSG::Node::create(); 
     72   OSG::NodeUnrecPtr n = OSG::Node::create(); 
    7373   n->setCore(OSG::Group::create()); 
    7474 
     
    7777   CHECK(bf::exists(test_file)); 
    7878 
    79    OSG::NodePtr new_n = 
     79   OSG::NodeUnrecPtr new_n = 
    8080      OSG::SceneFileHandler::the()->read(test_file.native_file_string().c_str()); 
    81    CHECK(new_n != OSGNullFC); 
     81   CHECK(new_n != NULL); 
    8282} 
    8383 
     
    8585{ 
    8686   // Test larger tree 
    87    OSG::NodePtr base_node  = OSG::Node::create(); 
     87   OSG::NodeUnrecPtr base_node  = OSG::Node::create(); 
    8888   base_node->setCore(OSG::Group::create()); 
    89    OSG::NodePtr child_node = OSG::Node::create(); 
     89   OSG::NodeUnrecPtr child_node = OSG::Node::create(); 
    9090   child_node->setCore(OSG::Group::create()); 
    9191 
     
    9696   CHECK(bf::exists(test_file)); 
    9797 
    98    OSG::NodePtr new_n = 
     98   OSG::NodeUnrecPtr new_n = 
    9999      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); 
    102102   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); 
    105105} 
    106106 
     
    109109{ 
    110110   std::string start_name("node"); 
    111    OSG::NodePtr n = OSG::Node::create(); 
     111   OSG::NodeUnrecPtr n = OSG::Node::create(); 
    112112   OSG::setName(n, start_name); 
    113113   n->setCore(OSG::Group::create()); 
     
    117117   CHECK(bf::exists(test_file)); 
    118118 
    119    OSG::NodePtr new_n = 
     119   OSG::NodeUnrecPtr new_n = 
    120120      OSG::SceneFileHandler::the()->read(test_file.native_file_string().c_str()); 
    121    CHECK(new_n != OSGNullFC); 
     121   CHECK(new_n != NULL); 
    122122   CHECK(OSG::getName(new_n) != NULL); 
    123123   std::string cur_name = std::string(OSG::getName(new_n)); 
  • trunk/Source/System/NodeCores/Drawables/Geometry/Properties/OSGGeoVectorPropertyTest.cpp

    r626 r1205  
    4949        p3f_1(2.0, 3.0, 4.0), 
    5050        p3f_2(3.0, 4.0, 5.0), 
    51         propP3f(OSGNullFC
     51        propP3f(
    5252    { 
    5353        propP3f = OSG::GeoPnt3fProperty::create(); 
     
    6666    const OSG::Pnt3f p3f_2; 
    6767 
    68     OSG::GeoPnt3fPropertyPtr propP3f; 
     68    OSG::GeoPnt3fPropertyUnrecPtr propP3f; 
    6969}; 
    7070 
     
    7272TEST_FIXTURE(GeoVectorPropertyFixture, GeoVectorProperty_Pnt3f) 
    7373{ 
    74     OSG::GeoVectorPropertyPtr prop = propP3f;  // throw away static type info 
     74    OSG::GeoVectorPropertyUnrecPtr prop = propP3f;  // throw away static type info 
    7575    OSG::Pnt2f  p2f; 
    7676    OSG::Pnt2d  p2d; 
  • trunk/Source/System/NodeCores/Groups/Misc/OSGNodeTest.cpp

    r877 r1205  
    4141#include <OpenSG/OSGNode.h> 
    4242#include <OpenSG/OSGNameAttachment.h> 
    43 #include <OpenSG/OSGFieldContainerAttachment.h> 
     43#include <OpenSG/OSGAttachment.h> 
    4444#include <OpenSG/OSGDynamicAttachmentMixin.h> 
    4545 
     
    5656struct TestAttDesc 
    5757{ 
    58     typedef OSG::FieldContainerAttachment    Parent; 
    59     typedef OSG::FieldContainerAttachmentPtr ParentPtr; 
     58    typedef OSG::Attachment    Parent; 
    6059     
    6160    // TODO rename it to VRMLGenericAtt ???? 
     
    6362    static const OSG::Char8 *getParentTypeName  (void)  
    6463    { 
    65         return "FieldContainerAttachment";  
     64        return "Attachment";  
    6665    } 
    6766    static const OSG::Char8 *getGroupName       (void) { return "TestGenAtt"; } 
     
    7372 
    7473typedef OSG::DynFieldAttachment<TestAttDesc>  TestAtt; 
    75 typedef TestAtt::ObjPtr                       TestAttPtr; 
     74typedef TestAtt::ObjTransitPtr                TestAttTransitPtr; 
     75typedef TestAtt::ObjRecPtr                    TestAttRecPtr; 
     76typedef TestAtt::ObjUnrecPtr                  TestAttUnrecPtr; 
     77typedef TestAtt::ObjWeakPtr                   TestAttWeakPtr; 
    7678 
    7779OSG_DYNFIELDATTACHMENT_INST(TestAttDesc) 
     
    8486TEST(CreateNode) 
    8587{ 
    86    OSG::NodePtr n = OSG::Node::create(); 
    87    CHECK(n != OSGNullFC); 
     88   OSG::NodeUnrecPtr n = OSG::Node::create(); 
     89   CHECK(n != NULL); 
    8890} 
    8991 
     
    9193TEST(TreeCloningName) 
    9294{ 
    93     OSG::NodePtr root = OSG::Node::create(); 
    94     OSG::NodePtr child_node = OSG::Node::create(); 
     95    OSG::NodeUnrecPtr root      = OSG::Node::create(); 
     96    OSG::NodeUnrecPtr child_node = OSG::Node::create(); 
    9597    root->addChild(child_node); 
    9698    OSG::setName(root, "root"); 
    9799    OSG::setName(child_node, "child_node"); 
    98100 
    99     OSG::NodePtr new_root = OSG::cloneTree(root); 
     101    OSG::NodeUnrecPtr new_root = OSG::cloneTree(root); 
    100102 
    101103    CHECK(new_root->getNChildren() == 1); 
     
    149151    } 
    150152 
    151     OSG::GroupPtr     g01Core; 
    152     OSG::SwitchPtr    s01Core; 
    153     OSG::TransformPtr t01Core; 
    154     OSG::GroupPtr     g02Core; 
    155     OSG::BillboardPtr b01Core; 
    156     OSG::GroupPtr     g03Core; 
    157     OSG::GroupPtr     g04Core; 
    158     OSG::BillboardPtr b02Core; 
    159     OSG::SwitchPtr    s02Core; 
    160     OSG::GroupPtr     g05Core; 
    161     OSG::GroupPtr     g06Core; 
    162  
    163     OSG::NodePtr      g01Node; 
    164     OSG::NodePtr      s01Node; 
    165     OSG::NodePtr      t01Node; 
    166     OSG::NodePtr      g02Node; 
    167     OSG::NodePtr      b01Node; 
    168     OSG::NodePtr      g03Node; 
    169     OSG::NodePtr      g04Node; 
    170     OSG::NodePtr      b02Node; 
    171     OSG::NodePtr      s02Node; 
    172     OSG::NodePtr      g05Node; 
    173     OSG::NodePtr      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; 
    174176}; 
    175177 
     
    177179{ 
    178180    // test cloneTree - all shared 
    179     OSG::NodePtr clone01 = OSG::cloneTree(g01Node); 
     181    OSG::NodeUnrecPtr clone01 = OSG::cloneTree(g01Node); 
    180182 
    181183    CHECK(clone01                                      != g01Node); 
     
    186188 
    187189    // test cloneTree - clone Switch 
    188     OSG::NodePtr clone02 = OSG::cloneTree(g01Node, "Switch", ""); 
     190    OSG::NodeUnrecPtr clone02 = OSG::cloneTree(g01Node, "Switch", ""); 
    189191 
    190192    CHECK(clone02->getCore()                           == g01Core); 
     
    196198 
    197199    // test cloneTree - clone Billboard, ignore Switch 
    198     OSG::NodePtr clone03 = OSG::cloneTree(g01Node, "Billboard", "Switch"); 
     200    OSG::NodeUnrecPtr clone03 = OSG::cloneTree(g01Node, "Billboard", "Switch"); 
    199201 
    200202    CHECK(clone03->getCore() == g01Core); 
    201203    CHECK(clone03->getChild(0)->getChild(0)->getCore() != b01Core); 
    202     CHECK(clone03->getChild(0)->getCore() == OSGNullFC); 
     204    CHECK(clone03->getChild(0)->getCore() == NULL); 
    203205    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); 
    205207} 
    206208 
     
    208210{ 
    209211    // test deepCloneTree - all cloned 
    210     OSG::NodePtr clone01 = OSG::deepCloneTree(g01Node); 
     212    OSG::NodeUnrecPtr clone01 = OSG::deepCloneTree(g01Node); 
    211213 
    212214    CHECK(clone01                         != g01Node); 
     
    220222 
    221223    // test deepCloneTree - share Switch 
    222     OSG::NodePtr clone02 = OSG::deepCloneTree(g01Node, "Switch"); 
     224    OSG::NodeUnrecPtr clone02 = OSG::deepCloneTree(g01Node, "Switch"); 
    223225 
    224226    CHECK(clone02->getCore()              != g01Core); 
     
    227229 
    228230    // test deepCloneTree - share Billboard, ignore Switch 
    229     OSG::NodePtr clone03 = OSG::deepCloneTree(g01Node, "Billboard", "Switch"); 
     231    OSG::NodeUnrecPtr clone03 = OSG::deepCloneTree(g01Node, "Billboard", "Switch"); 
    230232 
    231233    CHECK(clone03->getCore()                           != g01Core); 
    232     CHECK(clone03->getChild(0)->getCore()              == OSGNullFC); 
     234    CHECK(clone03->getChild(0)->getCore()              == NULL); 
    233235    CHECK(clone03->getChild(0)->getChild(0)->getCore() == b01Core); 
    234236    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); 
    236238} 
    237239 
    238240TEST(DynFieldAttachment) 
    239241{ 
    240     OSG::TestAttPtr pT = OSG::TestAtt::create(); 
     242    OSG::TestAttUnrecPtr pT = OSG::TestAtt::create(); 
    241243 
    242244    OSG::FieldDescriptionBase *pDesc = NULL; 
     
    255257            &OSG::TestAtt::getDynamicField )); 
    256258 
    257     CHECK(pT != OSGNullFC); 
     259    CHECK(pT != NULL); 
    258260 
    259261    OSG::UInt32 fIndex = pT->addField(*pDesc);