61 m_eval.Process(
"1" );
70 m_eval.SetVar(
"MoL", 42 );
72 m_eval.Process(
"1 + MoL" );
76 m_eval.SetVar(
"MoL", 422 );
79 m_eval.Process(
"1 + MoL" );
83 m_eval.SetVar(
"pi", 3.14 );
85 m_eval.RemoveVar(
"pi" );
92 m_eval.SetVar(
"piish", 3.1 );
96 m_eval.Process(
"1 + MoL + piish" );
127 {
"1 + 10mm + 1\" + 1.5in + 500mil",
"87.2" },
131 {
"1.5 + 0.2 + .1",
"1.8" },
135 {
"1 + 2 + 10 + 1000.05",
"1013.05" },
137 {
"1 + 2 - 4 * 20 / 2",
"-37" },
141 {
"-(1 + (2 - 4)) * 20.8 / 2",
"10.4" },
145 {
"x = 1; 1 + x",
"2" },
147 {
"x = 1; y = 2; 10 + x - y",
"9" },
170 m_eval.Process( c.input );
188 wxString degreeInput = wxT(
"1\u00B0" );
194 m_eval.Process( degreeInput );
252 m_eval.Process( c.input );
Declares the struct as the Boost test fixture.
BOOST_CHECK_EQUAL(std::any_cast< std::string >(rows[0].at("val")), "12345678901234567.89")
BOOST_AUTO_TEST_SUITE_END()
static const long long MM
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")