MOAB: Mesh Oriented datABase  (version 5.4.1)
cgns_test.cpp
Go to the documentation of this file.
00001 #include "TestUtil.hpp"
00002 #include "moab/Core.hpp"
00003 #define IS_BUILDING_MB
00004 #include "moab/Range.hpp"
00005 #include "moab/FileOptions.hpp"
00006 
00007 using namespace moab;
00008 
00009 std::string cgnsfile  = TestDir + "unittest/io/2d_naca0012.cgns";
00010 std::string cgnsfilew = TestDir + "unittest/io/test.cgns";
00011 
00012 void test_read_write();
00013 
00014 int main()
00015 {
00016     int result = 0;
00017 
00018     result += RUN_TEST( test_read_write );
00019 
00020     return result;
00021 }
00022 
00023 void test_read_write()
00024 {
00025     ErrorCode rval;
00026     Core moab;
00027     Interface& mb = moab;
00028     rval          = mb.load_file( cgnsfile.c_str() );
00029     if( MB_SUCCESS != rval ) std::cerr << "Trouble reading file " << cgnsfile << std::endl;CHECK_ERR( rval );
00030 
00031     rval = mb.write_file( cgnsfilew.c_str() );
00032     if( MB_SUCCESS != rval ) std::cerr << "Trouble writing file " << cgnsfilew << std::endl;CHECK_ERR( rval );
00033 }
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines