summaryrefslogtreecommitdiff
path: root/i/marvin/src/tester/test_tester.cc
diff options
context:
space:
mode:
Diffstat (limited to 'i/marvin/src/tester/test_tester.cc')
-rw-r--r--i/marvin/src/tester/test_tester.cc16
1 files changed, 9 insertions, 7 deletions
diff --git a/i/marvin/src/tester/test_tester.cc b/i/marvin/src/tester/test_tester.cc
index b89b25f..d292c7f 100644
--- a/i/marvin/src/tester/test_tester.cc
+++ b/i/marvin/src/tester/test_tester.cc
@@ -30,9 +30,10 @@ class TestTester : public Tester
// Constructor
TestTester (int argc, char ** argv)
: Tester (argc, argv) { }
- void funcA (const Interpreter::Args &a)
+ void funcA (const Interpreter::Args &a, bool dryrun)
{
- std::cout << " a " << a << std::endl;
+ if (!dryrun)
+ std::cout << " a " << a << std::endl;
}
void funcB (void)
{
@@ -52,12 +53,13 @@ class TestTester : public Tester
}
void preRun (void)
{
+ Interpreter &interpreter = getInterpreter ();
// Add functions.
- add ("a", Interpreter::memFunc (*this, &TestTester::funcA));
- add ("b", Interpreter::memFunc (*this, &TestTester::funcB));
- add ("c", Interpreter::memFunc (*this, &TestTester::funcC));
- add ("d", Interpreter::memFunc (*this, &TestTester::funcD));
- add ("e", Interpreter::memFunc (*this, &TestTester::funcE));
+ interpreter.add ("a", Interpreter::memFunc (*this, &TestTester::funcA), "Function a (any)");
+ interpreter.add ("b", Interpreter::memFunc (*this, &TestTester::funcB), "Function b ()");
+ interpreter.add ("c", Interpreter::memFunc (*this, &TestTester::funcC), "Function c (int)");
+ interpreter.add ("d", Interpreter::memFunc (*this, &TestTester::funcD), "Function d (string)");
+ interpreter.add ("e", Interpreter::memFunc (*this, &TestTester::funcE), "Function e (int, string, double)");
}
};