#include <string>
#include <vector>
Macros | |
#define | EXPECT_ERRORS(t) |
#define | EXPECT_NO_ERRORS(t) |
#define | EXPECT_RETURN_EQ(t, Type, method) |
#define | EXPECT_LIST_RETURN_EQ(t, Type, method) |
#define | EXPECT_DECAY_DELTA(decay_mode, ref_delta_z, ref_delta_a, name) |
#define | EXPECT_REACTION_DELTA(reaction_mt, ref_delta_z, ref_delta_a, name) |
#define | EXPECT_SAME_ACCESSOR_RESULT(t, type, acc) |
Typedefs | |
typedef std::vector< std::string > | Vec_Str |
Functions | |
std::string | string_errors (Vec_Str &errors) |
Macro Definition Documentation
#define EXPECT_ERRORS | ( | t | ) |
Value:
{ \
Vec_Str errors; \
EXPECT_FALSE( t->good( errors ) ) << string_errors( errors ) << "\n" \
<< t->to_string(); \
EXPECT_FALSE( errors.size() == 0 ); \
}
- Examples:
- tstTransitionSystem_Gen.cpp.
Referenced by TEST().
#define EXPECT_NO_ERRORS | ( | t | ) |
Value:
{ \
Vec_Str errors; \
EXPECT_TRUE( t->good( errors ) ) << string_errors( errors ) << "\n" \
<< t->to_string(); \
EXPECT_TRUE( errors.size() == 0 ); \
}
- Examples:
- tstTransitionSystem_Gen.cpp.
#define EXPECT_RETURN_EQ | ( | t, | |
Type, | |||
method | |||
) |
Value:
{ \
Type method; \
t->get_##method( method ); \
EXPECT_EQ( method, t->method() ); \
}
- Examples:
- tstTransitionSystem_Gen.cpp.
Referenced by TEST().
#define EXPECT_LIST_RETURN_EQ | ( | t, | |
Type, | |||
method | |||
) |
Value:
{ \
std::vector<Type> a_##method; \
t->get_##method( a_##method ); \
std::vector<Type> b_##method = t->method(); \
ASSERT_EQ( a_##method.size(), b_##method.size() ); \
for( size_t i = 0; i < a_##method.size(); ++i ) \
{ \
EXPECT_EQ( a_##method[i], b_##method[i] ); \
} \
}
- Examples:
- tstTransitionSystem_Gen.cpp.
Referenced by TEST().
#define EXPECT_DECAY_DELTA | ( | decay_mode, | |
ref_delta_z, | |||
ref_delta_a, | |||
name | |||
) |
Value:
{ \
Vec_Str errors; \
Origen::ChannelType::SP t( \
new Origen::ChannelType_Decay( decay_mode ) ); \
EXPECT_NO_ERRORS( t ); \
int dz = t->delta_charge_number(); \
int da = t->delta_mass_number(); \
EXPECT_EQ( ref_delta_z, dz ) << name << " delta_z not resolved:\n" \
<< t->to_string(); \
EXPECT_EQ( ref_delta_a, da ) << name << " delta_a not resolved:\n" \
<< t->to_string(); \
}
- Examples:
- tstTransitionSystem_Gen.cpp.
Referenced by TEST().
#define EXPECT_REACTION_DELTA | ( | reaction_mt, | |
ref_delta_z, | |||
ref_delta_a, | |||
name | |||
) |
Value:
{ \
Vec_Str errors; \
Origen::ChannelType::SP t( \
EXPECT_NO_ERRORS( t ); \
int dz = t->delta_charge_number(); \
int da = t->delta_mass_number(); \
EXPECT_EQ( ref_delta_z, dz ) << name << " delta_z not resolved:\n" \
<< t->to_string(); \
EXPECT_EQ( ref_delta_a, da ) << name << " delta_a not resolved:\n" \
<< t->to_string(); \
}
integer(c_int), parameter neutron_field
Definition: Definitions_M.f90:80
- Examples:
- tstTransitionSystem_Gen.cpp.
Referenced by TEST().
#define EXPECT_SAME_ACCESSOR_RESULT | ( | t, | |
type, | |||
acc | |||
) |
Value:
{ \
type val; \
t->get_##acc( val ); \
EXPECT_EQ( t->acc(), val ) << t->to_string(); \
EXPECT_NO_ERRORS( t ); \
}
- Examples:
- tstTransitionSystem_Gen.cpp.
Referenced by TEST().
Typedef Documentation
typedef std::vector<std::string> Vec_Str |
Function Documentation
std::string string_errors | ( | Vec_Str & | errors | ) |