NCBI C++ ToolKit
|
Search Toolkit Book for mu::Test::ParserTester
Test cases for unit testing. More...
#include <gui/utils/muparser/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 | TestVolatile () |
Test volatile (nonoptimizeable functions). More... | |
int | TestPostFix () |
int | TestExpression () |
int | TestInfixOprt () |
int | TestBinOprt () |
int | TestVarConst () |
int | TestInterface () |
int | TestException () |
int | TestStrArg () |
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 | 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 179 of file muParserTest.h.
mu::Test::ParserTester::ParserTester | ( | ) |
Definition at line 51 of file muParserTest.cpp.
References AddTest(), c_iCount, TestBinOprt(), TestException(), TestExpression(), TestInfixOprt(), TestInterface(), TestMultiArg(), TestNames(), TestPostFix(), TestStrArg(), TestSyntax(), TestVarConst(), and TestVolatile().
|
private |
Internal error in test class Test is going to be aborted.
Definition at line 1158 of file muParserTest.cpp.
References mu::console(), exit(), and wxT.
Referenced by Run().
|
private |
Definition at line 869 of file muParserTest.cpp.
References m_vTestFun.
Referenced by ParserTester().
|
private |
Evaluate a tet expression.
Definition at line 967 of file muParserTest.cpp.
References c_iCount, mu::console(), mu::ParserBase::DefineConst(), mu::ParserBase::DefineFun(), mu::ParserBase::DefineInfixOprt(), mu::ParserBase::DefinePostfixOprt(), mu::ParserBase::DefineVar(), mu::ParserBase::EnableOptimizer(), mu::ParserBase::Eval(), f1of1(), f1of2(), f1of3(), f1of4(), f1of5(), f2of2(), f2of3(), f2of4(), f2of5(), f3of3(), f3of4(), f3of5(), f4of4(), f4of5(), f5of5(), fabs, FirstArg(), mu::ParserError::GetMsg(), i, LastArg(), Max(), Milli(), Min(), PARSER_CONST_E, PARSER_CONST_PI, Ping(), plus2(), mu::prPOW, mu::ParserBase::SetExpr(), sign(), sqr(), StrFun1(), StrFun2(), StrFun3(), StrToFloat(), Sum(), times3(), ValueOf(), and wxT.
Referenced by TestBinOprt(), TestExpression(), TestInfixOprt(), TestMultiArg(), TestPostFix(), TestStrArg(), TestSyntax(), and TestVarConst().
|
private |
Definition at line 1106 of file muParserTest.cpp.
References c_iCount, mu::console(), mu::ParserBase::DefineConst(), mu::ParserBase::DefineVar(), mu::ParserBase::Eval(), mu::ParserError::GetExpr(), mu::ParserError::GetMsg(), mu::ParserBase::SetExpr(), and wxT.
Referenced by TestBinOprt().
|
inlinestaticprivate |
Definition at line 53 of file muParserTest.h.
Referenced by EqnTest(), and TestNames().
|
inlinestaticprivate |
Definition at line 55 of file muParserTest.h.
Referenced by EqnTest(), and TestNames().
|
inlinestaticprivate |
Definition at line 58 of file muParserTest.h.
Referenced by EqnTest().
|
inlinestaticprivate |
Definition at line 62 of file muParserTest.h.
Referenced by EqnTest().
|
inlinestaticprivate |
Definition at line 67 of file muParserTest.h.
Referenced by EqnTest().
|
inlinestaticprivate |
Definition at line 56 of file muParserTest.h.
Referenced by EqnTest().
|
inlinestaticprivate |
Definition at line 59 of file muParserTest.h.
Referenced by EqnTest().
|
inlinestaticprivate |
Definition at line 63 of file muParserTest.h.
Referenced by EqnTest().
|
inlinestaticprivate |
Definition at line 68 of file muParserTest.h.
Referenced by EqnTest().
|
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 65 of file muParserTest.h.
Referenced by EqnTest().
|
inlinestaticprivate |
Definition at line 70 of file muParserTest.h.
Referenced by EqnTest().
|
inlinestaticprivate |
Definition at line 71 of file muParserTest.h.
Referenced by EqnTest().
|
inlinestaticprivate |
|
inlinestaticprivate |
|
inlinestaticprivate |
Definition at line 74 of file muParserTest.h.
Referenced by EqnTest().
|
inlinestaticprivate |
Definition at line 159 of file muParserTest.h.
Referenced by EqnTest().
|
inlinestaticprivate |
Definition at line 73 of file muParserTest.h.
Referenced by EqnTest().
|
inlinestaticprivate |
Definition at line 117 of file muParserTest.h.
Referenced by EqnTest(), and ThrowTest().
|
inlinestaticprivate |
Definition at line 76 of file muParserTest.h.
Referenced by EqnTest().
|
inlinestaticprivate |
Definition at line 107 of file muParserTest.h.
Referenced by TestVolatile().
|
inlinestaticprivate |
Definition at line 112 of file muParserTest.h.
Referenced by TestVolatile().
void mu::Test::ParserTester::Run | ( | void | ) |
Definition at line 875 of file muParserTest.cpp.
References Abort(), c_iCount, mu::console(), mu::ParserError::GetMsg(), mu::ParserError::GetToken(), i, int, and m_vTestFun.
|
inlinestaticprivate |
Definition at line 79 of file muParserTest.h.
Referenced by EqnTest().
|
inlinestaticprivate |
Definition at line 78 of file muParserTest.h.
Referenced by EqnTest().
|
inlinestaticprivate |
Definition at line 127 of file muParserTest.h.
References val.
Referenced by EqnTest(), and ThrowTest().
|
inlinestaticprivate |
Definition at line 134 of file muParserTest.h.
Referenced by EqnTest(), and ThrowTest().
|
inlinestaticprivate |
Definition at line 141 of file muParserTest.h.
Referenced by EqnTest(), and ThrowTest().
|
inlinestaticprivate |
|
inlinestaticprivate |
|
private |
Definition at line 137 of file muParserTest.cpp.
References mu::console(), EqnTest(), EqnTestInt(), and wxT.
Referenced by ParserTester().
|
private |
Definition at line 796 of file muParserTest.cpp.
References 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_ARG_SEP, mu::ecUNEXPECTED_EOF, mu::ecUNEXPECTED_FUN, mu::ecUNEXPECTED_OPERATOR, mu::ecUNEXPECTED_PARENS, mu::ecUNEXPECTED_VAL, mu::ecUNTERMINATED_STRING, mu::ecVAL_EXPECTED, ThrowTest(), and wxT.
Referenced by ParserTester().
|
private |
Definition at line 736 of file muParserTest.cpp.
References mu::console(), EqnTest(), and wxT.
Referenced by ParserTester().
|
private |
Definition at line 549 of file muParserTest.cpp.
References mu::console(), EqnTest(), and wxT.
Referenced by ParserTester().
|
private |
Definition at line 71 of file muParserTest.cpp.
References mu::console(), mu::ParserBase::DefineVar(), mu::ParserBase::Eval(), mu::ParserBase::RemoveVar(), mu::ParserBase::SetExpr(), and wxT.
Referenced by ParserTester().
|
private |
Definition at line 465 of file muParserTest.cpp.
References mu::console(), EqnTest(), and wxT.
Referenced by ParserTester().
|
private |
Check muParser name restriction enforcement.
Definition at line 232 of file muParserTest.cpp.
References a, mu::ParserBase::ClearConst(), mu::console(), mu::ParserBase::EnableBuiltInOprt(), f1of1(), f1of2(), PARSER_THROWCHECK, and wxT.
Referenced by ParserTester().
|
private |
Definition at line 608 of file muParserTest.cpp.
References mu::console(), EqnTest(), and wxT.
Referenced by ParserTester().
|
private |
Definition at line 113 of file muParserTest.cpp.
References mu::console(), EqnTest(), and wxT.
Referenced by ParserTester().
|
private |
Definition at line 333 of file muParserTest.cpp.
References mu::console(), EqnTest(), and wxT.
Referenced by ParserTester().
|
private |
Definition at line 376 of file muParserTest.cpp.
References mu::console(), mu::ParserBase::DefineVar(), EqnTest(), mu::ParserBase::GetUsedVar(), int, mu::ParserBase::SetExpr(), and wxT.
Referenced by ParserTester().
|
private |
Test volatile (nonoptimizeable functions).
Definition at line 650 of file muParserTest.cpp.
References mu::console(), mu::ParserBase::DefineFun(), mu::ParserBase::Eval(), mu::ParserError::GetExpr(), mu::ParserError::GetMsg(), Rnd(), RndWithString(), mu::ParserBase::SetExpr(), and wxT.
Referenced by ParserTester().
|
private |
Definition at line 915 of file muParserTest.cpp.
References c_iCount, mu::console(), mu::ParserBase::DefineFun(), mu::ParserBase::DefineVar(), mu::ParserBase::Eval(), mu::ParserError::GetCode(), Ping(), mu::ParserBase::SetExpr(), StrFun1(), StrFun2(), StrFun3(), ValueOf(), and wxT.
Referenced by TestException().
|
inlinestaticprivate |
Definition at line 77 of file muParserTest.h.
Referenced by EqnTest().
|
inlinestaticprivate |
Definition at line 122 of file muParserTest.h.
Referenced by EqnTest(), and ThrowTest().
|
staticprivate |
Definition at line 161 of file muParserTest.h.
Referenced by EqnTest(), EqnTestInt(), ParserTester(), Run(), and ThrowTest().
|
private |
Definition at line 185 of file muParserTest.h.