summaryrefslogtreecommitdiff
path: root/i/marvin/src/tester/test_tester.cc
diff options
context:
space:
mode:
authordufourj2006-04-20 21:00:28 +0000
committerdufourj2006-04-20 21:00:28 +0000
commit0e7bc7bb9ff3be0b28a7c60b624f0b75e780f99f (patch)
tree4ffd9bdfeaa61138bf1718e39b01c692a16f360d /i/marvin/src/tester/test_tester.cc
parentca36067c122bea18bda2b904ec831e26902f412e (diff)
Tester :
- better manage optargs; - correct the placement of the data_circular_buffer_factory. Interpreter : - better help format.
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)");
}
};