diff options
author | Henning Baldersheim <balder@yahoo-inc.com> | 2017-04-26 22:41:35 +0200 |
---|---|---|
committer | Henning Baldersheim <balder@yahoo-inc.com> | 2017-04-26 22:41:35 +0200 |
commit | d336400e3e95685d62ec05c09e1582c3abcb34fc (patch) | |
tree | 02c8d2dd3988e10bdc8bf9ff5902cf0124d5a3e5 /vdstestlib | |
parent | 46dd4350fd595b42ef213981773487f62c86417b (diff) |
no virtual on override + optimize includes.
Diffstat (limited to 'vdstestlib')
4 files changed, 9 insertions, 17 deletions
diff --git a/vdstestlib/src/tests/cppunit/testrunner.cpp b/vdstestlib/src/tests/cppunit/testrunner.cpp index 1ba7be7790e..c25bee698d5 100644 --- a/vdstestlib/src/tests/cppunit/testrunner.cpp +++ b/vdstestlib/src/tests/cppunit/testrunner.cpp @@ -1,9 +1,8 @@ // Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -#include <vespa/fastos/fastos.h> #include <vespa/vdstestlib/cppunit/cppunittestrunner.h> -int main(int argc, char **argv) +int main(int argc, const char *argv[]) { vdstestlib::CppUnitTestRunner testRunner; return testRunner.run(argc, argv); diff --git a/vdstestlib/src/tests/dirconfig/dirconfigtest.cpp b/vdstestlib/src/tests/dirconfig/dirconfigtest.cpp index e00815241f0..73f6f3cc600 100644 --- a/vdstestlib/src/tests/dirconfig/dirconfigtest.cpp +++ b/vdstestlib/src/tests/dirconfig/dirconfigtest.cpp @@ -1,15 +1,10 @@ // Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -#include <vespa/fastos/fastos.h> +#include <vespa/vespalib/testkit/testapp.h> +#include <vespa/vespalib/util/exceptions.h> #include <vespa/vdstestlib/cppunit/dirconfig.h> - #include <fstream> #include <iostream> -#include <vespa/log/log.h> -#include <vespa/vespalib/testkit/testapp.h> -#include <vespa/vespalib/util/exceptions.h> - -LOG_SETUP("dirconfig_test"); using namespace vdstestlib; diff --git a/vdstestlib/src/vespa/vdstestlib/cppunit/cppunittestrunner.cpp b/vdstestlib/src/vespa/vdstestlib/cppunit/cppunittestrunner.cpp index 7af156bbc2a..fb692bd8e8f 100644 --- a/vdstestlib/src/vespa/vdstestlib/cppunit/cppunittestrunner.cpp +++ b/vdstestlib/src/vespa/vdstestlib/cppunit/cppunittestrunner.cpp @@ -1,11 +1,9 @@ // Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -#include <vespa/fastos/fastos.h> #include <vespa/vdstestlib/cppunit/cppunittestrunner.h> #include <cppunit/extensions/TestFactoryRegistry.h> #include <cppunit/ui/text/TestRunner.h> -#include <cppunit/TestSuite.h> #include <cppunit/TextTestProgressListener.h> #include <vespa/log/log.h> #include <iostream> @@ -22,7 +20,7 @@ namespace { std::vector<std::string> _wanted; bool _includeStressTests; - WantedTestList(int argc, const char * const * argv, + WantedTestList(int argc, const char *argv[], bool includeStressTests) : _wanted(), _includeStressTests(includeStressTests) @@ -66,7 +64,7 @@ namespace { return (s[s.size() - 1] == '$'); } - virtual bool include(const std::string& name) const override { + bool include(const std::string& name) const override { if ((name.find("stress") != std::string::npos || name.find("Stress") != std::string::npos) && !_includeStressTests) @@ -90,11 +88,11 @@ namespace { struct LogHook : public CppUnit::TextTestProgressListener::TestStartHook { std::string lastTest; - virtual void startedTest(const std::string& testName) override { + void startedTest(const std::string& testName) override { LOG(info, "Starting test: %s", testName.c_str()); lastTest = testName; } - virtual void stoppedTest() override { + void stoppedTest() override { LOG(info, "Stopped test: %s", lastTest.c_str()); } }; @@ -112,7 +110,7 @@ CppUnitTestRunner::CppUnitTestRunner() } int -CppUnitTestRunner::run(int argc, const char * const * argv) +CppUnitTestRunner::run(int argc, const char *argv[]) { CppUnit::TextUi::TestRunner runner; CppUnit::TestFactoryRegistry& registry( diff --git a/vdstestlib/src/vespa/vdstestlib/cppunit/cppunittestrunner.h b/vdstestlib/src/vespa/vdstestlib/cppunit/cppunittestrunner.h index e8ee1700927..204cfff0cb8 100644 --- a/vdstestlib/src/vespa/vdstestlib/cppunit/cppunittestrunner.h +++ b/vdstestlib/src/vespa/vdstestlib/cppunit/cppunittestrunner.h @@ -50,7 +50,7 @@ public: CppUnitTestRunner(); void listTests(const CppUnit::TestSuite *tests); - int run(int argc, const char * const * argv); + int run(int argc, const char * argv[]); }; |