NumeRe v1.1.4
NumeRe: Framework für Numerische Rechnungen
|
Test cases for unit testing. More...
#include <muParserTest.h>
Public Types | |
typedef int(ParserTester::* | testfun_type) () |
Public Member Functions | |
ParserTester () | |
void | Run () |
Private Member Functions | |
int | TestNames () |
Check muParser name restriction enforcement. More... | |
int | TestSyntax () |
int | TestMultiArg () |
int | TestPostFix () |
int | TestExpression () |
int | TestInfixOprt () |
int | TestBinOprt () |
int | TestVarConst () |
int | TestInterface () |
int | TestException () |
int | TestStrArg () |
int | TestIfThenElse () |
void | Abort () const |
Internal error in test class Test is going to be aborted. More... | |
void | AddTest (testfun_type a_pFun) |
int | EqnTest (const string_type &a_str, double a_fRes, bool a_fPass) |
Evaluate a tet expression. More... | |
int | EqnTestWithVarChange (const string_type &a_str, double a_fRes1, double a_fVar1, double a_fRes2, double a_fVar2) |
Evaluate a tet expression. More... | |
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) |
Private Attributes | |
std::vector< testfun_type > | m_vTestFun |
Static Private Attributes | |
static int | c_iCount = 0 |
typedef int(ParserTester::* mu::Test::ParserTester::testfun_type) () |
Definition at line 184 of file muParserTest.h.
mu::Test::ParserTester::ParserTester | ( | ) |
Definition at line 49 of file muParserTest.cpp.
References AddTest(), c_iCount, TestBinOprt(), TestException(), TestExpression(), TestIfThenElse(), TestInfixOprt(), TestInterface(), TestMultiArg(), TestNames(), TestPostFix(), TestStrArg(), TestSyntax(), and TestVarConst().
|
private |
Internal error in test class Test is going to be aborted.
Definition at line 1441 of file muParserTest.cpp.
References _nrT, and mu::console().
Referenced by Run().
|
inlinestaticprivate |
Definition at line 82 of file muParserTest.h.
Referenced by EqnTest().
|
private |
Definition at line 1057 of file muParserTest.cpp.
References m_vTestFun.
Referenced by ParserTester().
|
private |
Evaluate a tet expression.
Definition at line 1211 of file muParserTest.cpp.
References _nrT, add(), c_iCount, mu::console(), mu::ParserBase::DefineConst(), mu::ParserBase::EnableOptimizer(), mu::ParserBase::Eval(), f1of1(), f1of2(), f1of3(), f1of4(), f1of5(), f2of2(), f2of3(), f2of4(), f2of5(), f3of3(), f3of4(), f3of5(), f4of4(), f4of5(), f5of5(), FirstArg(), mu::ParserError::GetMsg(), IsHexVal(), land(), LastArg(), Max(), Mega(), Milli(), Min(), PARSER_CONST_E, PARSER_CONST_PI, Ping(), plus2(), mu::prLAND, mu::prPOW, sign(), sqr(), StrFun1(), StrFun2(), StrFun3(), StrToFloat(), Sum(), times3(), and ValueOf().
Referenced by TestBinOprt(), TestExpression(), TestIfThenElse(), TestInfixOprt(), TestMultiArg(), TestPostFix(), TestStrArg(), TestSyntax(), and TestVarConst().
|
private |
Definition at line 1389 of file muParserTest.cpp.
References _nrT, c_iCount, mu::console(), mu::ParserBase::DefineConst(), mu::ParserBase::DefineVar(), mu::ParserBase::Eval(), mu::ParserError::GetExpr(), mu::ParserError::GetMsg(), and mu::ParserBase::SetExpr().
Referenced by TestBinOprt().
|
private |
Evaluate a tet expression.
Definition at line 1157 of file muParserTest.cpp.
References _nrT, c_iCount, mu::console(), mu::ParserBase::DefineVar(), mu::ParserBase::Eval(), mu::ParserError::GetMsg(), and mu::ParserBase::SetExpr().
Referenced by TestVarConst().
|
inlinestaticprivate |
Definition at line 55 of file muParserTest.h.
Referenced by EqnTest(), and TestNames().
|
inlinestaticprivate |
Definition at line 57 of file muParserTest.h.
Referenced by EqnTest(), and TestNames().
|
inlinestaticprivate |
Definition at line 60 of file muParserTest.h.
Referenced by EqnTest().
|
inlinestaticprivate |
Definition at line 64 of file muParserTest.h.
Referenced by EqnTest().
|
inlinestaticprivate |
Definition at line 69 of file muParserTest.h.
Referenced by EqnTest().
|
inlinestaticprivate |
Definition at line 58 of file muParserTest.h.
Referenced by EqnTest().
|
inlinestaticprivate |
Definition at line 61 of file muParserTest.h.
Referenced by EqnTest().
|
inlinestaticprivate |
Definition at line 65 of file muParserTest.h.
Referenced by EqnTest().
|
inlinestaticprivate |
Definition at line 70 of file muParserTest.h.
Referenced by EqnTest().
|
inlinestaticprivate |
Definition at line 62 of file muParserTest.h.
Referenced by EqnTest().
|
inlinestaticprivate |
Definition at line 66 of file muParserTest.h.
Referenced by EqnTest().
|
inlinestaticprivate |
Definition at line 71 of file muParserTest.h.
Referenced by EqnTest().
|
inlinestaticprivate |
Definition at line 67 of file muParserTest.h.
Referenced by EqnTest().
|
inlinestaticprivate |
Definition at line 72 of file muParserTest.h.
Referenced by EqnTest().
|
inlinestaticprivate |
Definition at line 73 of file muParserTest.h.
Referenced by EqnTest().
|
inlinestaticprivate |
|
staticprivate |
Definition at line 69 of file muParserTest.cpp.
References fast_float::hex.
Referenced by EqnTest().
|
inlinestaticprivate |
Definition at line 83 of file muParserTest.h.
Referenced by EqnTest().
|
inlinestaticprivate |
|
inlinestaticprivate |
Definition at line 76 of file muParserTest.h.
Referenced by EqnTest().
|
inlinestaticprivate |
Definition at line 161 of file muParserTest.h.
Referenced by EqnTest().
|
inlinestaticprivate |
Definition at line 162 of file muParserTest.h.
|
inlinestaticprivate |
Definition at line 163 of file muParserTest.h.
Referenced by EqnTest(), and ThrowTest().
|
inlinestaticprivate |
Definition at line 75 of file muParserTest.h.
Referenced by EqnTest().
|
inlinestaticprivate |
Definition at line 122 of file muParserTest.h.
Referenced by EqnTest(), and ThrowTest().
|
inlinestaticprivate |
Definition at line 78 of file muParserTest.h.
Referenced by EqnTest().
|
inlinestaticprivate |
Definition at line 112 of file muParserTest.h.
|
inlinestaticprivate |
Definition at line 117 of file muParserTest.h.
void mu::Test::ParserTester::Run | ( | ) |
Definition at line 1063 of file muParserTest.cpp.
References Abort(), c_iCount, mu::console(), mu::ParserError::GetMsg(), mu::ParserError::GetToken(), and m_vTestFun.
|
inlinestaticprivate |
Definition at line 81 of file muParserTest.h.
Referenced by EqnTest().
|
inlinestaticprivate |
Definition at line 80 of file muParserTest.h.
Referenced by EqnTest().
|
inlinestaticprivate |
Definition at line 132 of file muParserTest.h.
Referenced by EqnTest(), and ThrowTest().
|
inlinestaticprivate |
Definition at line 139 of file muParserTest.h.
Referenced by EqnTest(), and ThrowTest().
|
inlinestaticprivate |
Definition at line 146 of file muParserTest.h.
Referenced by EqnTest(), and ThrowTest().
|
inlinestaticprivate |
Definition at line 153 of file muParserTest.h.
Referenced by EqnTest().
|
inlinestaticprivate |
|
private |
Definition at line 160 of file muParserTest.cpp.
References _nrT, mu::console(), EqnTest(), and EqnTestInt().
Referenced by ParserTester().
|
private |
Definition at line 978 of file muParserTest.cpp.
References _nrT, mu::console(), mu::ecMISSING_PARENS, mu::ecOPRT_TYPE_CONFLICT, mu::ecSTR_RESULT, mu::ecSTRING_EXPECTED, mu::ecTOO_FEW_PARAMS, mu::ecTOO_MANY_PARAMS, mu::ecUNASSIGNABLE_TOKEN, mu::ecUNEXPECTED_EOF, mu::ecUNEXPECTED_FUN, mu::ecUNEXPECTED_OPERATOR, mu::ecUNEXPECTED_PARENS, mu::ecUNEXPECTED_VAL, mu::ecUNTERMINATED_STRING, mu::ecVAL_EXPECTED, and ThrowTest().
Referenced by ParserTester().
|
private |
Definition at line 788 of file muParserTest.cpp.
References _nrT, mu::console(), and EqnTest().
Referenced by ParserTester().
|
private |
Definition at line 871 of file muParserTest.cpp.
References _nrT, mu::console(), mu::ecMISPLACED_COLON, mu::ecMISSING_ELSE_CLAUSE, mu::ecUNASSIGNABLE_TOKEN, mu::ecUNEXPECTED_CONDITIONAL, EqnTest(), and ThrowTest().
Referenced by ParserTester().
|
private |
Definition at line 670 of file muParserTest.cpp.
References _nrT, mu::console(), EqnTest(), and PARSER_CONST_PI.
Referenced by ParserTester().
|
private |
Definition at line 91 of file muParserTest.cpp.
References _nrT, mu::console(), mu::ParserBase::DefineVar(), mu::ParserBase::Eval(), mu::ParserBase::RemoveVar(), and mu::ParserBase::SetExpr().
Referenced by ParserTester().
|
private |
Definition at line 573 of file muParserTest.cpp.
References _nrT, mu::console(), and EqnTest().
Referenced by ParserTester().
|
private |
Check muParser name restriction enforcement.
Definition at line 302 of file muParserTest.cpp.
References _nrT, mu::ParserBase::ClearConst(), mu::ParserBase::ClearPostfixOprt(), mu::console(), mu::ParserBase::EnableBuiltInOprt(), f1of1(), f1of2(), and PARSER_THROWCHECK.
Referenced by ParserTester().
|
private |
Definition at line 736 of file muParserTest.cpp.
References _nrT, mu::console(), mu::ecUNASSIGNABLE_TOKEN, mu::ecUNEXPECTED_EOF, mu::ecUNEXPECTED_PARENS, EqnTest(), and ThrowTest().
Referenced by ParserTester().
|
private |
Definition at line 134 of file muParserTest.cpp.
References _nrT, mu::console(), and EqnTest().
Referenced by ParserTester().
|
private |
Definition at line 411 of file muParserTest.cpp.
References _nrT, mu::console(), mu::ecUNEXPECTED_EOF, EqnTest(), and ThrowTest().
Referenced by ParserTester().
|
private |
Definition at line 463 of file muParserTest.cpp.
References _nrT, mu::console(), mu::ParserBase::DefineVar(), EqnTest(), EqnTestWithVarChange(), mu::ParserBase::GetUsedVar(), mu::ParserBase::GetVar(), and mu::ParserBase::SetExpr().
Referenced by ParserTester().
|
private |
Definition at line 1104 of file muParserTest.cpp.
References _nrT, c_iCount, mu::console(), mu::ParserBase::DefineFun(), mu::ParserBase::DefinePostfixOprt(), mu::ParserBase::DefineVar(), mu::ParserBase::Eval(), mu::ParserError::GetCode(), mu::ParserError::GetMsg(), Milli(), Ping(), mu::ParserBase::SetExpr(), StrFun1(), StrFun2(), StrFun3(), and ValueOf().
Referenced by TestException(), TestIfThenElse(), TestPostFix(), and TestSyntax().
|
inlinestaticprivate |
Definition at line 79 of file muParserTest.h.
Referenced by EqnTest().
|
inlinestaticprivate |
Definition at line 127 of file muParserTest.h.
Referenced by EqnTest(), and ThrowTest().
|
staticprivate |
Definition at line 52 of file muParserTest.h.
Referenced by EqnTest(), EqnTestInt(), EqnTestWithVarChange(), ParserTester(), Run(), and ThrowTest().
|
private |
Definition at line 190 of file muParserTest.h.