MOAB: Mesh Oriented datABase  (version 5.2.1)
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.

Defines

#define IS_BUILDING_MB

Functions

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

Variables

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

Define Documentation

#define IS_BUILDING_MB

Definition at line 3 of file ccmio_test.cpp.


Function Documentation

int main ( )

Definition at line 16 of file ccmio_test.cpp.

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

{
    int result = 0;

    result += RUN_TEST( test_write );
    result += RUN_TEST( test_read );

    return result;
}
void test_read ( )

Definition at line 38 of file ccmio_test.cpp.

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

Referenced by main().

{
    ErrorCode rval;
    Core moab;
    Interface& mb = moab;
    rval          = mb.load_file( ccmgfiler.c_str() );CHECK_ERR( rval );
}
void test_write ( )

Definition at line 26 of file ccmio_test.cpp.

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

Referenced by main().

{
    ErrorCode rval;
    Core moab;
    Interface& mb = moab;
    rval          = mb.load_file( cubfile.c_str() );
    if( MB_SUCCESS != rval ) std::cerr << "Trouble reading file " << cubfile << std::endl;CHECK_ERR( rval );

    rval = mb.write_file( ccmgfilew.c_str() );
    if( MB_SUCCESS != rval ) std::cerr << "Trouble writing file " << ccmgfilew << std::endl;CHECK_ERR( rval );
}

Variable Documentation

std::string ccmgfiler = "/io/singlecyl.ccmg"

Definition at line 10 of file ccmio_test.cpp.

Referenced by test_read().

std::string ccmgfilew = "singlecyl_tmp.ccmg"

Definition at line 11 of file ccmio_test.cpp.

Referenced by test_write().

std::string cubfile = "/io/singlecyl.cub"

Definition at line 9 of file ccmio_test.cpp.

Referenced by test_write().

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines