Adds assert function, which expects boolean argument.
If the argument is false, then an exception is raised and
batch mode will end with failure.
Change-Id: Id7f6114623cdff0f1962099b3b79e96066be5bf6
return convert(pt);
}
};
+ variables["assert"] = detail::UserFunctionType<bool> {
+ [&](EvaluationContext & ec, bool condition) -> EvaluationValue {
+ if (!condition) throw EvaluationFailure{} << "assertion failed";
+ return {};
+ }
+ };
variables["wait_for_application"] = detail::UserFunctionType<std::string> {
[&](EvaluationContext & ec, std::string name) -> EvaluationValue {
auto h = contextInfo.lock();