From 0e7bc7bb9ff3be0b28a7c60b624f0b75e780f99f Mon Sep 17 00:00:00 2001 From: dufourj Date: Thu, 20 Apr 2006 21:00:28 +0000 Subject: Tester : - better manage optargs; - correct the placement of the data_circular_buffer_factory. Interpreter : - better help format. --- i/marvin/src/tester/test_tester.cc | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'i/marvin/src/tester/test_tester.cc') 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)"); } }; -- cgit v1.2.3