From c425ae7693b604c190d3904e7ef965f93d34edee Mon Sep 17 00:00:00 2001 From: schodet Date: Sun, 2 Apr 2006 17:23:53 +0000 Subject: Support des fonctions qui ne retournent pas de bool. Support du dry run. --- i/marvin/src/interpreter/test_interpreter.cc | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) (limited to 'i/marvin/src/interpreter/test_interpreter.cc') diff --git a/i/marvin/src/interpreter/test_interpreter.cc b/i/marvin/src/interpreter/test_interpreter.cc index 99a9ad9..8c2eb88 100644 --- a/i/marvin/src/interpreter/test_interpreter.cc +++ b/i/marvin/src/interpreter/test_interpreter.cc @@ -32,30 +32,28 @@ class TestInterpreter { Interpreter t; public: - bool funcA (const Interpreter::Args &a) + void funcA (const Interpreter::Args &a, bool dryrun) { - std::cout << " a " << a << std::endl; - return true; + if (!dryrun) + std::cout << " a " << a << std::endl; } bool funcB (void) { std::cout << " b ( )" << std::endl; return true; } - bool funcC (int i) + int funcC (int i) { std::cout << " c ( " << i << " )" << std::endl; - return true; + return 0; } - bool funcD (const std::string &s) + void funcD (const std::string &s) { std::cout << " d ( " << s << " )" << std::endl; - return true; } - bool funcE (int i, const std::string &s, double d) + void funcE (int i, const std::string &s, double d) { std::cout << " e ( " << i << ' ' << s << ' ' << d << " )" << std::endl; - return true; } void call (const std::string &s, const Interpreter::Args &a) { -- cgit v1.2.3