29 #ifndef MU_PARSER_TEST_H
30 #define MU_PARSER_TEST_H
100 return a_afArg[a_iArgc - 1];
109 for (
int i = 0; i < a_iArgc; ++i) fRes += a_afArg[i];
115 return (
value_type)(1 + (v * std::rand() / (RAND_MAX + 1.0)));
120 return (
value_type)(1.0 + (1000.0 * std::rand() / (RAND_MAX + 1.0)));
151 return val + v2 + v3;
158 return val + v2 + v3 + v4;
165 return val + v2 + v3 + v4 + v5;
187 int TestExpression();
194 int TestIfThenElse();
196 int TestOssFuzzTestCases();
207 std::vector<testfun_type> m_vTestFun;
208 void AddTest(testfun_type a_pFun);
211 int EqnTest(
const string_type& a_str,
double a_fRes,
bool a_fPass);
212 int EqnTestWithVarChange(
const string_type& a_str,
double a_fRes1,
double a_fVar1,
double a_fRes2,
double a_fVar2);
213 int ThrowTest(
const string_type& a_str,
int a_iErrc,
bool a_bFail =
true);
216 int EqnTestInt(
const string_type& a_str,
double a_fRes,
bool a_fPass);
219 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.