Function(const Callback& function);
- Value Invoke(const std::vector<Value>& arguments);
+ Value Invoke(const std::vector<Value>& arguments = std::vector<Value>());
static Object::Ptr GetPrototype(void);
recursionLevel)));
ScriptFrame frame(resolvers_this);
- std::vector<Value> args;
- return func->Invoke(args);
+ return func->Invoke();
}
Value MacroProcessor::InternalResolveMacros(const String& str, const ResolverList& resolvers,
{
ScriptFrame frame;
Expression *expr;
+ Function::Ptr func;
expr = ConfigCompiler::CompileText("<test>", "regex(\"^Hello\", \"Hello World\")");
BOOST_CHECK(expr->Evaluate(frame));
expr = ConfigCompiler::CompileText("<test>", "Array.x");
BOOST_CHECK_THROW(expr->Evaluate(frame), ScriptError);
delete expr;
+
+ expr = ConfigCompiler::CompileText("<test>", "{{ 3 }}");
+ func = expr->Evaluate(frame);
+ BOOST_CHECK(func->Invoke() == 3);
+ delete expr;
}
BOOST_AUTO_TEST_SUITE_END()