MOAB: Mesh Oriented datABase
(version 5.5.0)
read_cgm_load_test.cpp
Go to the documentation of this file.
1
#include <iostream>
2
#include "
moab/Interface.hpp
"
3
#ifndef IS_BUILDING_MB
4
#define IS_BUILDING_MB
5
#endif
6
#include "
TestUtil.hpp
"
7
#include "
Internals.hpp
"
8
#include "
moab/Core.hpp
"
9
10
using namespace
moab
;
11
12
#define CHKERR( A ) \
13
do \
14
{ \
15
if( MB_SUCCESS != ( A ) ) \
16
{ \
17
std::cerr << "Failure (error code "
<< ( A ) << ") at " __FILE__ ":" << __LINE__ << std::endl; \
18
return A; \
19
} \
20
} while( false )
21
22
#ifdef HAVE_OCC_STEP
23
std::string
input_file
= TestDir +
"unittest/io/dum.stp"
;
24
#else
25
std::string
input_file
= TestDir +
"unittest/io/dum.sat"
;
26
#endif
27
28
// Checks that a file can be loaded twice without errors
29
void
read_multiple_test
()
30
{
31
Core
mb
;
32
33
ErrorCode
rval =
mb
.
load_file
(
input_file
.c_str() );
CHECK_ERR
( rval );
34
// second load
35
rval =
mb
.
load_file
(
input_file
.c_str() );
CHECK_ERR
( rval );
36
}
37
38
int
main
(
int
/* argc */
,
char
**
/* argv */
)
39
{
40
int
result =
RUN_TEST
(
read_multiple_test
);
41
42
return
result;
43
}
test
io
read_cgm_load_test.cpp
Generated on Wed Oct 4 2023 14:20:31 for MOAB: Mesh Oriented datABase by
1.9.1