MOAB: Mesh Oriented datABase  (version 5.5.0)
ccmio_test.cpp File Reference
#include "TestUtil.hpp"
#include "moab/Core.hpp"
#include "moab/Range.hpp"
#include "moab/FileOptions.hpp"
+ Include dependency graph for ccmio_test.cpp:

Go to the source code of this file.

Macros

#define IS_BUILDING_MB
 

Functions

void test_read ()
 
void test_write ()
 
int main ()
 

Variables

std::string cubfile = TestDir + "unittest/io/singlecyl.cub"
 
std::string ccmgfiler = TestDir + "unittest/io/singlecyl.ccmg"
 
std::string ccmgfilew = "singlecyl_tmp.ccmg"
 

Macro Definition Documentation

◆ IS_BUILDING_MB

#define IS_BUILDING_MB

Definition at line 3 of file ccmio_test.cpp.

Function Documentation

◆ main()

int main ( )

Definition at line 16 of file ccmio_test.cpp.

17 {
18  int result = 0;
19 
20  result += RUN_TEST( test_write );
21  result += RUN_TEST( test_read );
22 
23  return result;
24 }

References RUN_TEST, test_read(), and test_write().

◆ test_read()

void test_read ( )

Definition at line 38 of file ccmio_test.cpp.

39 {
40  ErrorCode rval;
41  Core moab;
42  Interface& mb = moab;
43  rval = mb.load_file( ccmgfiler.c_str() );CHECK_ERR( rval );
44 }

References ccmgfiler, CHECK_ERR, ErrorCode, moab::Core::load_file(), and mb.

Referenced by main().

◆ test_write()

void test_write ( )

Definition at line 26 of file ccmio_test.cpp.

27 {
28  ErrorCode rval;
29  Core moab;
30  Interface& mb = moab;
31  rval = mb.load_file( cubfile.c_str() );
32  if( MB_SUCCESS != rval ) std::cerr << "Trouble reading file " << cubfile << std::endl;CHECK_ERR( rval );
33 
34  rval = mb.write_file( ccmgfilew.c_str() );
35  if( MB_SUCCESS != rval ) std::cerr << "Trouble writing file " << ccmgfilew << std::endl;CHECK_ERR( rval );
36 }

References ccmgfilew, CHECK_ERR, cubfile, ErrorCode, moab::Core::load_file(), mb, MB_SUCCESS, and moab::Core::write_file().

Referenced by main().

Variable Documentation

◆ ccmgfiler

std::string ccmgfiler = TestDir + "unittest/io/singlecyl.ccmg"

Definition at line 10 of file ccmio_test.cpp.

Referenced by test_read().

◆ ccmgfilew

std::string ccmgfilew = "singlecyl_tmp.ccmg"

Definition at line 11 of file ccmio_test.cpp.

Referenced by test_write().

◆ cubfile

std::string cubfile = TestDir + "unittest/io/singlecyl.cub"

Definition at line 9 of file ccmio_test.cpp.

Referenced by test_write().