C++ Mathematical Expression Library (ExprTk) http://www.partow.net/programming/exprtk/index.html
This commit is contained in:
parent
bc153274a0
commit
13a256fcb2
|
@ -3822,7 +3822,10 @@ inline bool run_test14()
|
||||||
|
|
||||||
std::deque<std::string> expr_str_list;
|
std::deque<std::string> expr_str_list;
|
||||||
|
|
||||||
if (0 == load_expressions("exprtk_functional_test.txt",expr_str_list))
|
load_expressions("exprtk_functional_test.txt" ,expr_str_list);
|
||||||
|
load_expressions("exprtk_functional_ext_test.txt",expr_str_list);
|
||||||
|
|
||||||
|
if (expr_str_list.empty())
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -3844,12 +3847,15 @@ inline bool run_test14()
|
||||||
printf("run_test14() - Error: %s Expression: %s\n",
|
printf("run_test14() - Error: %s Expression: %s\n",
|
||||||
parser.error().c_str(),
|
parser.error().c_str(),
|
||||||
expr_str_list[i].c_str());
|
expr_str_list[i].c_str());
|
||||||
return false;
|
failure = true;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
expression_list.push_back(current_expression);
|
expression_list.push_back(current_expression);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (failure)
|
||||||
|
break;
|
||||||
|
|
||||||
for (std::size_t i = 0; i < expression_list.size(); ++i)
|
for (std::size_t i = 0; i < expression_list.size(); ++i)
|
||||||
{
|
{
|
||||||
T result = expression_list[i].value();
|
T result = expression_list[i].value();
|
||||||
|
|
Loading…
Reference in New Issue