1 #include <boost/foreach.hpp>
2 #include <boost/bind.hpp>
4 #include <ozulis/core/assert.hh>
5 #include <moulette/test-factory.hh>
6 #include <moulette/testable.hh>
7 #include <moulette/listener.hh>
10 template class std::vector
<moulette::Testable
*>;
11 template class ozulis::core::Singleton
<moulette::Moulette
>;
16 : ozulis::core::Singleton
<Moulette
>(),
26 BOOST_FOREACH(Testable
* test
, tests_
)
31 Moulette::addTest(const boost::filesystem::path
& path
)
33 Testable
* test
= TestFactory::loadTest(path
);
39 Moulette::addTest(Testable
* test
)
42 tests_
.push_back(test
);
48 BOOST_FOREACH(Testable
* test
, tests_
)
54 Moulette::registerListener(Listener
& listener
)
56 testStarting
.connect(boost::bind(&Listener::testStarting
, &listener
, _1
));
57 testFinished
.connect(boost::bind(&Listener::testFinished
, &listener
, _1
));
58 finished
.connect(boost::bind(&Listener::finished
, &listener
));