26 #ifndef MU_PARSER_TEST_H
27 #define MU_PARSER_TEST_H
94 return a_afArg[a_iArgc-1];
103 for (
int i=0;
i<a_iArgc; ++
i) fRes += a_afArg[
i];
109 return (
value_type)(1+(v*std::rand()/(RAND_MAX+1.0)));
114 return (
value_type)( 1 + (1000.0f * std::rand() / (RAND_MAX + 1.0) ) );
145 return val +
v2 + v3;
ParserError exception_type
Type of the error class.
Test cases for unit testing.
static value_type f2of4(value_type, value_type v, value_type, value_type)
static value_type ValueOf(const char_type *)
static value_type Sum(const value_type *a_afArg, int a_iArgc)
static value_type f2of3(value_type, value_type v, value_type)
static value_type StrFun3(const char_type *v1, value_type v2, value_type v3)
std::vector< testfun_type > m_vTestFun
void Abort() const
Internal error in test class Test is going to be aborted.
static value_type Min(value_type a_fVal1, value_type a_fVal2)
int(ParserTester::* testfun_type)()
int ThrowTest(const string_type &a_str, int a_iErrc, bool a_bFail=true)
int EqnTestInt(const string_type &a_str, double a_fRes, bool a_fPass)
static value_type f4of5(value_type, value_type, value_type, value_type v, value_type)
static value_type Milli(value_type v)
static value_type f3of3(value_type, value_type, value_type v)
static value_type FirstArg(const value_type *a_afArg, int a_iArgc)
static value_type plus2(value_type v1)
static value_type times3(value_type v1)
static value_type RndWithString(const char_type *)
int TestVolatile()
Test volatile (nonoptimizeable functions).
static value_type LastArg(const value_type *a_afArg, int a_iArgc)
static value_type Rnd(value_type v)
static value_type f2of2(value_type, value_type v)
static value_type f4of4(value_type, value_type, value_type, value_type v)
static value_type f1of4(value_type v, value_type, value_type, value_type)
static value_type Max(value_type a_fVal1, value_type a_fVal2)
static value_type sign(value_type v)
void AddTest(testfun_type a_pFun)
int EqnTest(const string_type &a_str, double a_fRes, bool a_fPass)
Evaluate a tet expression.
static value_type f3of4(value_type, value_type, value_type v, value_type)
static value_type f2of5(value_type, value_type v, value_type, value_type, value_type)
static value_type StrFun1(const char_type *v1)
int TestNames()
Check muParser name restriction enforcement.
static value_type f1of3(value_type v, value_type, value_type)
static value_type f1of1(value_type v)
static value_type f3of5(value_type, value_type, value_type v, value_type, value_type)
static value_type StrToFloat(const char_type *a_szMsg)
static value_type f5of5(value_type, value_type, value_type, value_type, value_type v)
static value_type f1of2(value_type v, value_type)
static value_type sqr(value_type v1)
static value_type f1of5(value_type v, value_type, value_type, value_type, value_type)
static value_type StrFun2(const char_type *v1, value_type v2)
static void Test(const char *bind1, SQLSMALLINT type1, const char *bind2, SQLSMALLINT type2)
unsigned int
A callback function used to compare two keys in a database.
Definition of a parser using integer value.
Definition of the standard floating point parser.
Namespace for mathematical applications.
string_type::value_type char_type
The character type used by the 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.
double value_type
The numeric datatype used by the parser.
std::string string_type
The stringtype used by the parser.