64 m_eval.Process(
"1" );
73 m_eval.SetVar(
"MoL", 42 );
75 m_eval.Process(
"1 + MoL" );
79 m_eval.SetVar(
"MoL", 422 );
82 m_eval.Process(
"1 + MoL" );
86 m_eval.SetVar(
"pi", 3.14 );
88 m_eval.RemoveVar(
"pi" );
95 m_eval.SetVar(
"piish", 3.1 );
99 m_eval.Process(
"1 + MoL + piish" );
130 {
"1 + 10mm + 1\" + 1.5in + 500mil",
"87.2" },
134 {
"1.5 + 0.2 + .1",
"1.8" },
138 {
"1 + 2 + 10 + 1000.05",
"1013.05" },
140 {
"1 + 2 - 4 * 20 / 2",
"-37" },
144 {
"-(1 + (2 - 4)) * 20.8 / 2",
"10.4" },
148 {
"x = 1; 1 + x",
"2" },
150 {
"x = 1; y = 2; 10 + x - y",
"9" },
173 m_eval.Process( c.input );
191 wxString degreeInput = wxT(
"1\u00B0" );
197 m_eval.Process( degreeInput );
255 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")