Changeset 457 for trunk/Source/System/FileIO/OSB/OSGOSBTest.cpp
- Timestamp:
- 12/24/06 07:27:43 (2 years ago)
- Files:
-
- trunk/Source/System/FileIO/OSB/OSGOSBTest.cpp (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/Source/System/FileIO/OSB/OSGOSBTest.cpp
r264 r457 1 /*---------------------------------------------------------------------------*\ 2 * OpenSG * 3 * * 4 * * 5 * Copyright (C) 2000-2006 by the OpenSG Forum * 6 * * 7 * contact: dirk@opensg.org, gerrit.voss@vossg.org, jbehr@zgdv.de * 8 * * 9 \*---------------------------------------------------------------------------*/ 10 /*---------------------------------------------------------------------------*\ 11 * License * 12 * * 13 * This library is free software; you can redistribute it and/or modify it * 14 * under the terms of the GNU Library General Public License as published * 15 * by the Free Software Foundation, version 2. * 16 * * 17 * This library is distributed in the hope that it will be useful, but * 18 * WITHOUT ANY WARRANTY; without even the implied warranty of * 19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * 20 * Library General Public License for more details. * 21 * * 22 * You should have received a copy of the GNU Library General Public * 23 * License along with this library; if not, write to the Free Software * 24 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * 25 * * 26 \*---------------------------------------------------------------------------*/ 27 /*---------------------------------------------------------------------------*\ 28 * Changes * 29 * * 30 * * 31 * * 32 * * 33 * * 34 * * 35 \*---------------------------------------------------------------------------*/ 1 36 2 37 #include <UnitTest++.h> 3 38 4 // Unit tests for vec classes39 // Unit tests for OSB file io. 5 40 6 41 #include <OpenSG/OSGNode.h> … … 10 45 #include <boost/filesystem/operations.hpp> 11 46 #include <boost/filesystem/operations.hpp> 47 12 48 namespace bf = boost::filesystem; 49 50 SUITE(OSBTests) 51 { 13 52 14 53 struct FileFixture … … 32 71 { 33 72 OSG::NodePtr n = OSG::Node::create(); 34 35 CHECK(!bf::exists(test_file)); 73 74 CHECK(!bf::exists(test_file)); 36 75 OSG::SceneFileHandler::the()->write(n, test_file.native_file_string().c_str()); 37 76 CHECK(bf::exists(test_file)); 38 39 OSG::NodePtr new_n = 77 78 OSG::NodePtr new_n = 40 79 OSG::SceneFileHandler::the()->read(test_file.native_file_string().c_str()); 41 80 CHECK(new_n != OSG::NullFC); … … 49 88 OSG::setName(n, start_name); 50 89 51 CHECK(!bf::exists(test_file)); 52 OSG::SceneFileHandler::the()->write(n, test_file.native_file_string().c_str()); 90 CHECK(!bf::exists(test_file)); 91 OSG::SceneFileHandler::the()->write(n, test_file.native_file_string().c_str()); 53 92 CHECK(bf::exists(test_file)); 54 55 OSG::NodePtr new_n = 93 94 OSG::NodePtr new_n = 56 95 OSG::SceneFileHandler::the()->read(test_file.native_file_string().c_str()); 57 96 CHECK(new_n != OSG::NullFC); 58 97 CHECK(OSG::getName(new_n) != NULL); 59 98 std::string cur_name = std::string(OSG::getName(new_n)); 60 99 61 100 CHECK(cur_name == start_name); 62 101 } 102 103 } // SUITE
