summaryrefslogtreecommitdiff
path: root/i/marvin/src/interpreter/test_interpreter.cc
diff options
context:
space:
mode:
authorschodet2006-04-02 17:23:53 +0000
committerschodet2006-04-02 17:23:53 +0000
commitc425ae7693b604c190d3904e7ef965f93d34edee (patch)
tree4ce709554b2c0d2e872a0da6c903de77765ee02c /i/marvin/src/interpreter/test_interpreter.cc
parentc927f32a735e1600cf6b50a315d204963cf5877e (diff)
Support des fonctions qui ne retournent pas de bool.
Support du dry run.
Diffstat (limited to 'i/marvin/src/interpreter/test_interpreter.cc')
-rw-r--r--i/marvin/src/interpreter/test_interpreter.cc16
1 files changed, 7 insertions, 9 deletions
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)
{