MOAB: Mesh Oriented datABase
(version 5.5.0)
ccmio_test.cpp
Go to the documentation of this file.
1
#include "
TestUtil.hpp
"
2
#include "
moab/Core.hpp
"
3
#define IS_BUILDING_MB
4
#include "
moab/Range.hpp
"
5
#include "
moab/FileOptions.hpp
"
6
7
using namespace
moab
;
8
9
std::string
cubfile
= TestDir +
"unittest/io/singlecyl.cub"
;
10
std::string
ccmgfiler
= TestDir +
"unittest/io/singlecyl.ccmg"
;
11
std::string
ccmgfilew
=
"singlecyl_tmp.ccmg"
;
12
13
void
test_read
();
14
void
test_write
();
15
16
int
main
()
17
{
18
int
result = 0;
19
20
result +=
RUN_TEST
(
test_write
);
21
result +=
RUN_TEST
(
test_read
);
22
23
return
result;
24
}
25
26
void
test_write
()
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
}
37
38
void
test_read
()
39
{
40
ErrorCode
rval;
41
Core
moab
;
42
Interface
&
mb
=
moab
;
43
rval =
mb
.
load_file
(
ccmgfiler
.c_str() );
CHECK_ERR
( rval );
44
}
test
io
ccmio_test.cpp
Generated on Wed Oct 4 2023 14:20:26 for MOAB: Mesh Oriented datABase by
1.9.1