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.cc36
1 files changed, 14 insertions, 22 deletions
diff --git a/i/marvin/src/tester/test_tester.cc b/i/marvin/src/tester/test_tester.cc
index 8db2a31..b89b25f 100644
--- a/i/marvin/src/tester/test_tester.cc
+++ b/i/marvin/src/tester/test_tester.cc
@@ -24,48 +24,40 @@
// }}}
#include "tester.hh"
-class TestTester
+class TestTester : public Tester
{
- Tester t;
public:
// Constructor
TestTester (int argc, char ** argv)
- : t (argc, argv) { }
- bool funcA (const Interpreter::Args &a)
+ : Tester (argc, argv) { }
+ void funcA (const Interpreter::Args &a)
{
std::cout << " a " << a << std::endl;
- return true;
}
- bool funcB (void)
+ void funcB (void)
{
std::cout << " b ( )" << std::endl;
- return true;
}
- bool funcC (int i)
+ void funcC (int i)
{
std::cout << " c ( " << i << " )" << std::endl;
- return true;
}
- 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;
}
- int main (void)
+ void preRun (void)
{
// Add functions.
- t.add ("a", Interpreter::memFunc (*this, &TestTester::funcA));
- t.add ("b", Interpreter::memFunc (*this, &TestTester::funcB));
- t.add ("c", Interpreter::memFunc (*this, &TestTester::funcC));
- t.add ("d", Interpreter::memFunc (*this, &TestTester::funcD));
- t.add ("e", Interpreter::memFunc (*this, &TestTester::funcE));
- t.run ();
- return 0;
+ 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));
}
};
@@ -75,7 +67,7 @@ main (int argc, char **argv)
try
{
TestTester tt (argc, argv);
- return tt.main ();
+ tt.run ();
}
catch (const std::exception &e)
{