3 #include <boost/foreach.hpp>
5 #include <ozulis/core/assert.hh>
6 #include <moulette/test-parser.hh>
7 #include <moulette/tests/basic-test-suite.hh>
8 #include <moulette/tests/compile-test.hh>
9 #include <moulette/tests/dummy-test.hh>
10 #include <moulette/tests/expr-test-suite.hh>
11 #include <moulette/tests/simple-process.hh>
12 #include "test-factory.hh"
17 TestFactory::loadTest(const boost::filesystem::path
& path
)
19 assert(boost::filesystem::is_regular_file(path
));
21 return TestParser::parseFile(path
);
25 TestFactory::create(const std::string
& type
)
29 if (type
== "simple-process")
30 return new SimpleProcess
;
31 if (type
== "test-suite")
32 return new BasicTestSuite
;
33 if (type
== "compile-test")
34 return new CompileTest
;
35 if (type
== "expr-test-suite")
36 return new ExprTestSuite
;
37 std::cerr
<< "test not found: " << type
<< std::endl
;