65 m_eval.Process(
"1" );
74 m_eval.SetVar(
"MoL", 42 );
76 m_eval.Process(
"1 + MoL" );
80 m_eval.SetVar(
"MoL", 422 );
83 m_eval.Process(
"1 + MoL" );
87 m_eval.SetVar(
"pi", 3.14 );
89 m_eval.RemoveVar(
"pi" );
96 m_eval.SetVar(
"piish", 3.1 );
100 m_eval.Process(
"1 + MoL + piish" );
131 {
"1 + 10mm + 1\" + 1.5in + 500mil",
"87.2" },
135 {
"1.5 + 0.2 + .1",
"1.8" },
139 {
"1 + 2 + 10 + 1000.05",
"1013.05" },
141 {
"1 + 2 - 4 * 20 / 2",
"-37" },
145 {
"-(1 + (2 - 4)) * 20.8 / 2",
"10.4" },
149 {
"x = 1; 1 + x",
"2" },
151 {
"x = 1; y = 2; 10 + x - y",
"9" },
174 m_eval.Process( c.input );
192 wxString degreeInput = wxT(
"1\u00B0" );
198 m_eval.Process( degreeInput );
256 m_eval.Process( c.input );
Declares the struct as the Boost test fixture.
BOOST_CHECK_EQUAL(ret, c.m_exp_result)
BOOST_AUTO_TEST_SUITE_END()
static const std::vector< EVAL_INVALID_CASE > eval_cases_invalid
A list of invalid test strings.
BOOST_AUTO_TEST_CASE(Basic)
Basic class ops: set one up, trivial input, tear it down.
static const std::vector< EVAL_CASE > eval_cases_valid
A list of valid test strings and the expected results.
BOOST_TEST_CONTEXT("Test Clearance")