[moulette] starting a xml listener
[ozulis.git] / src / moulette / listeners / console-listener.cc
bloba01c24a6a7a1d7500d0c773d24f22c83d87a6b85
1 #include <iostream>
3 #include <moulette/testable.hh>
4 #include "console-listener.hh"
6 namespace moulette
8 ConsoleListener::ConsoleListener()
9 : Listener()
13 void
14 ConsoleListener::starting(const Testable * test)
16 if (test->isTestSuite())
17 std::cout << "Starting " << test->name() << " test suite:" << std::endl;
18 else
19 std::cout << "Starting " << test->name() << "...";
22 void
23 ConsoleListener::finished(const Testable * test)
25 const TestResult & result = test->result();
26 if (!test->isTestSuite())
27 std::cout << (result.succeed ? "[OK]" : "[KO]") << std::endl;