// Copyright (c) 2005-2007 Andre Merzky (andre@merzky.net) // Copyright (c) 2005-2007 Hartmut Kaiser (hartmut.kaiser@gmail.com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) #include #include #include #include "test_saga.hpp" #include "test_init.hpp" #include "test_engine.hpp" #include "test_session.hpp" #include "test_context.hpp" #include "test_exception.hpp" #include "test_task.hpp" #include "test_task_container.hpp" #include "test_url.hpp" #include "test_uuid.hpp" using boost::unit_test_framework::test_suite; /////////////////////////////////////////////////////////////////////////////// // This is the actual test suite entry point test_suite * init_unit_test_suite (int argc, char* argv[]) { test_suite * suite = BOOST_TEST_SUITE ("saga test suite"); if ( argc > 1 ) { test_init init (suite, argv[1]); } else { // no ini given on command line, use exe name boost::filesystem::path p (argv[0]); std::string leaf (p.leaf()); std::string::size_type pos = leaf.find_last_of("."); if ( std::string::npos != pos ) { leaf.replace (pos + 1, leaf.size () - pos, "ini"); p = p.branch_path () / leaf; } else { p = p.branch_path () / (p.leaf () + ".ini"); } test_init init (suite, p.string ()); } // Add default engine tests suite->add (new test_engine :: suite ()); suite->add (new test_session :: suite ()); suite->add (new test_context :: suite ()); suite->add (new test_exception :: suite ()); suite->add (new test_task :: suite ()); suite->add (new test_task_container :: suite ()); // Add utility classes tests suite->add (new test_url :: suite ()); suite->add (new test_uuid :: suite ()); return suite; }