// Copyright (c) 2005-2006 Andre Merzky (andre@merzky.net) // Copyright (c) 2005-2006 Hartmut Kaiser (hartmut.kaiser@gmail.com) // Copyright (c) 2006 Chris Miceli (cmicel1@cct.lsu.edu) // Copyright (c) 2006 Ole Christian Weidner (oweidner@cct.lsu.edu) // // 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 "test_saga.hpp" #include "test_file.hpp" #include "test_init.hpp" /////////////////////////////////////////////////////////////////////////////// // 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 C++ Conformance Tests"); std::cout << "SAGA C++ Conformance Tests" << std::endl; 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()); } return suite; }