26 #ifndef MU_PARSER_TEST_H
27 #define MU_PARSER_TEST_H
99 return a_afArg[a_iArgc-1];
108 for (
int i=0; i<a_iArgc; ++i) fRes += a_afArg[i];
114 return (
value_type)(1+(v*std::rand()/(RAND_MAX+1.0)));
119 return (
value_type)( 1 + (1000.0f * std::rand() / (RAND_MAX + 1.0) ) );
150 return val + v2 + v3;
172 int TestExpression();
179 int TestIfThenElse();
191 std::vector<testfun_type> m_vTestFun;
192 void AddTest(testfun_type a_pFun);
195 int EqnTest(
const string_type& a_str,
double a_fRes,
bool a_fPass);
201 int ThrowTest(
const string_type& a_str,
int a_iErrc,
bool a_bFail =
true);
204 int EqnTestInt(
const string_type& a_str,
double a_fRes,
bool a_fPass);
207 int EqnTestBulk(
const string_type& a_str,
double a_fRes[4],
bool a_fPass);
#define _T(x)
Activate this option in order to compile with OpenMP support.
Definition of a parser using integer value.
Definition of the standard floating point parser.
std::basic_stringstream< char_type, std::char_traits< char_type >, std::allocator< char_type > > stringstream_type
Typedef for easily using stringstream that respect the parser stringtype.
MUP_BASETYPE value_type
The numeric datatype used by the parser.
Test cases for unit testing.
Namespace for mathematical applications.
string_type::value_type char_type
The character type used by the parser.
MUP_STRING_TYPE string_type
The stringtype used by the parser.
ParserError exception_type
Type of the error class.