>From 7d9cce74be0c3311831918b5cfbdf72eaecbdf3c Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sun, 14 Dec 2014 18:29:17 +0100 Subject: [PATCH 4/4] Remove support for config file in GUI test suite as it is not used any more. After the previous commit, there is no need for a configuration file in the test suite code any longer, so remove support for it entirely. --- main_wx_test.cpp | 23 ----------------------- wx_test_case.hpp | 8 -------- 2 files changed, 0 insertions(+), 31 deletions(-) diff --git a/main_wx_test.cpp b/main_wx_test.cpp index b1fa798..5acb363 100644 --- a/main_wx_test.cpp +++ b/main_wx_test.cpp @@ -176,9 +176,6 @@ class application_test // Used by LMI_WX_TEST_CASE() macro to register the individual test cases. void add_test(wx_base_test_case* test); - // Used by tests to retrieve their configuration parameters. - wxConfigBase const& get_config_for(char const* name); - // Return the configured directory (current one by default) to use for the // test files. fs::path const& get_test_files_path() const { return test_files_path_; } @@ -235,8 +232,6 @@ class application_test std::vector tests_; - boost::scoped_ptr config_; - fs::path test_files_path_; bool run_all_; @@ -533,19 +528,6 @@ void application_test::list_tests() std::cerr << tests_.size() << " test cases.\n"; } -wxConfigBase const& application_test::get_config_for(char const* name) -{ - if(!config_) - { - wxFFileInputStream is("wx_test.conf", "r"); - config_.reset(new wxFileConfig(is)); - } - - config_->SetPath(wxString("/") + name); - - return *config_; -} - } // Unnamed namespace. wx_base_test_case::wx_base_test_case(char const* name) @@ -554,11 +536,6 @@ void application_test::list_tests() application_test::instance().add_test(this); } -wxConfigBase const& wx_base_test_case::config() const -{ - return application_test::instance().get_config_for(get_name()); -} - void wx_base_test_case::skip_if_not_supported(char const* file) { const wxString p(file); diff --git a/wx_test_case.hpp b/wx_test_case.hpp index ab517c1..7a6ae9e 100644 --- a/wx_test_case.hpp +++ b/wx_test_case.hpp @@ -30,8 +30,6 @@ #include -class wxConfigBase; - /// Base class for the test case objects. /// /// It is only supposed to be used by LMI_WX_TEST_CASE macro and not directly. @@ -90,12 +88,6 @@ class wx_base_test_case /// The argument must be a literal, as we just store the pointer. explicit wx_base_test_case(char const* name); - /// Get the object containing test configuration. - /// - /// The returned object will have the group containing the options for this - /// test as its current path for convenience. - wxConfigBase const& config() const; - char const* const m_name; }; -- 1.7.9