summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2017-04-26 22:41:35 +0200
committerHenning Baldersheim <balder@yahoo-inc.com>2017-04-26 22:41:35 +0200
commitd336400e3e95685d62ec05c09e1582c3abcb34fc (patch)
tree02c8d2dd3988e10bdc8bf9ff5902cf0124d5a3e5
parent46dd4350fd595b42ef213981773487f62c86417b (diff)
no virtual on override + optimize includes.
-rw-r--r--document/src/tests/arrayfieldvaluetest.cpp4
-rw-r--r--document/src/tests/documentselectparsertest.cpp102
-rw-r--r--document/src/tests/documentupdatetestcase.cpp2
-rw-r--r--document/src/tests/primitivefieldvaluetest.cpp3
-rw-r--r--document/src/tests/serialization/annotationserializer_test.cpp1
-rw-r--r--document/src/tests/structfieldvaluetest.cpp2
-rw-r--r--document/src/tests/testrunner.cpp5
-rw-r--r--document/src/tests/teststringutil.h2
-rw-r--r--document/src/tests/weightedsetfieldvaluetest.cpp3
-rw-r--r--messagebus_test/src/tests/error/cpp-client.cpp10
-rw-r--r--messagebus_test/src/tests/error/cpp-server.cpp11
-rw-r--r--messagebus_test/src/tests/errorcodes/dumpcodes.cpp6
-rw-r--r--messagebus_test/src/tests/speed/cpp-client.cpp8
-rw-r--r--messagebus_test/src/tests/speed/cpp-server.cpp8
-rw-r--r--messagebus_test/src/tests/trace/cpp-server.cpp10
-rw-r--r--metrics/src/tests/metricmanagertest.cpp14
-rw-r--r--metrics/src/tests/metricsettest.cpp6
-rw-r--r--metrics/src/tests/snapshottest.cpp9
-rw-r--r--metrics/src/tests/stresstest.cpp4
-rw-r--r--metrics/src/tests/testrunner.cpp6
-rw-r--r--storageframework/src/tests/clock/timetest.cpp3
-rw-r--r--storageframework/src/tests/memory/memorymanagertest.cpp3
-rw-r--r--storageframework/src/tests/memory/memorystatetest.cpp12
-rw-r--r--storageframework/src/tests/testrunner.cpp2
-rw-r--r--storageframework/src/tests/thread/taskthreadtest.cpp2
-rw-r--r--storageframework/src/tests/thread/tickingthreadtest.cpp12
-rw-r--r--storageserver/src/tests/testrunner.cpp7
-rw-r--r--vdstestlib/src/tests/cppunit/testrunner.cpp3
-rw-r--r--vdstestlib/src/tests/dirconfig/dirconfigtest.cpp9
-rw-r--r--vdstestlib/src/vespa/vdstestlib/cppunit/cppunittestrunner.cpp12
-rw-r--r--vdstestlib/src/vespa/vdstestlib/cppunit/cppunittestrunner.h2
-rw-r--r--vespaclient/src/vespa/vespaclient/spoolmaster/application.h14
-rw-r--r--vespaclient/src/vespa/vespaclient/vespadoclocator/application.h1
-rw-r--r--vespaclient/src/vespa/vespaclient/vesparoute/application.h4
-rw-r--r--vespaclient/src/vespa/vespaclient/vesparoute/mynetwork.h5
35 files changed, 75 insertions, 232 deletions
diff --git a/document/src/tests/arrayfieldvaluetest.cpp b/document/src/tests/arrayfieldvaluetest.cpp
index 85659c0cbb4..7f31e0c3b3a 100644
--- a/document/src/tests/arrayfieldvaluetest.cpp
+++ b/document/src/tests/arrayfieldvaluetest.cpp
@@ -1,6 +1,5 @@
// 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/document/fieldvalue/fieldvalues.h>
#include <vespa/document/serialization/vespadocumentdeserializer.h>
#include <vespa/vdstestlib/cppunit/macros.h>
@@ -11,9 +10,6 @@ using vespalib::nbostream;
namespace document {
struct ArrayFieldValueTest : public CppUnit::TestFixture {
- void setUp() override {}
- void tearDown() override {}
-
void testArray();
CPPUNIT_TEST_SUITE(ArrayFieldValueTest);
diff --git a/document/src/tests/documentselectparsertest.cpp b/document/src/tests/documentselectparsertest.cpp
index 8e17dd12e12..6957634cbde 100644
--- a/document/src/tests/documentselectparsertest.cpp
+++ b/document/src/tests/documentselectparsertest.cpp
@@ -1,17 +1,12 @@
// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-//#include <boost/regex/icu.hpp>
-#include <vespa/fastos/fastos.h>
#include <cppunit/TestFixture.h>
#include <cppunit/extensions/HelperMacros.h>
#include <vespa/document/repo/configbuilder.h>
#include <vespa/document/repo/documenttyperepo.h>
-#include <iostream>
-#include <memory>
#include <vespa/document/update/assignvalueupdate.h>
#include <vespa/document/base/testdocman.h>
-#include <vespa/document/base/testdocrepo.h>
#include <vespa/document/select/parser.h>
#include <vespa/document/select/visitor.h>
#include <vespa/document/select/bodyfielddetector.h>
@@ -66,7 +61,6 @@ public:
: _bucketIdFactory() {}
void setUp() override;
- void tearDown() override {}
void createDocs();
void testParseTerminals();
@@ -912,32 +906,27 @@ namespace {
std::ostringstream data;
public:
- virtual ~TestVisitor() {}
+ ~TestVisitor() {}
- void visitConstant(const select::Constant& node) override
- {
+ void visitConstant(const select::Constant& node) override {
data << "CONSTANT(" << node << ")";
}
- virtual void
- visitInvalidConstant(const select::InvalidConstant& node) override
- {
+ void
+ visitInvalidConstant(const select::InvalidConstant& node) override {
data << "INVALIDCONSTANT(" << node << ")";
}
- void visitDocumentType(const select::DocType& node) override
- {
+ void visitDocumentType(const select::DocType& node) override {
data << "DOCTYPE(" << node << ")";
}
- void visitComparison(const select::Compare& node) override
- {
+ void visitComparison(const select::Compare& node) override {
data << "COMPARE(" << node.getLeft() << " "
<< node.getOperator() << " " << node.getRight() << ")";
}
- void visitAndBranch(const select::And& node) override
- {
+ void visitAndBranch(const select::And& node) override {
data << "AND(";
node.getLeft().visit(*this);
data << ", ";
@@ -945,8 +934,7 @@ namespace {
data << ")";
}
- void visitOrBranch(const select::Or& node) override
- {
+ void visitOrBranch(const select::Or& node) override {
data << "OR(";
node.getLeft().visit(*this);
data << ", ";
@@ -954,72 +942,24 @@ namespace {
data << ")";
}
- void visitNotBranch(const select::Not& node) override
- {
+ void visitNotBranch(const select::Not& node) override {
data << "NOT(";
node.getChild().visit(*this);
data << ")";
}
- virtual void
- visitArithmeticValueNode(const select::ArithmeticValueNode &) override
- {
- }
-
- virtual void
- visitFunctionValueNode(const select::FunctionValueNode &) override
- {
- }
-
- virtual void
- visitIdValueNode(const select::IdValueNode &) override
- {
- }
-
- virtual void
- visitSearchColumnValueNode(const select::SearchColumnValueNode &) override
- {
- }
-
- virtual void
- visitFieldValueNode(const select::FieldValueNode &) override
- {
- }
-
- virtual void
- visitFloatValueNode(const select::FloatValueNode &) override
- {
- }
-
- virtual void
- visitVariableValueNode(const select::VariableValueNode &) override
- {
- }
-
- virtual void
- visitIntegerValueNode(const select::IntegerValueNode &) override
- {
- }
-
- virtual void
- visitCurrentTimeValueNode(const select::CurrentTimeValueNode &) override
- {
- }
-
- virtual void
- visitStringValueNode(const select::StringValueNode &) override
- {
- }
-
- virtual void
- visitNullValueNode(const select::NullValueNode &) override
- {
- }
-
- virtual void
- visitInvalidValueNode(const select::InvalidValueNode &) override
- {
- }
+ void visitArithmeticValueNode(const select::ArithmeticValueNode &) override {}
+ void visitFunctionValueNode(const select::FunctionValueNode &) override {}
+ void visitIdValueNode(const select::IdValueNode &) override {}
+ void visitSearchColumnValueNode(const select::SearchColumnValueNode &) override {}
+ void visitFieldValueNode(const select::FieldValueNode &) override {}
+ void visitFloatValueNode(const select::FloatValueNode &) override {}
+ void visitVariableValueNode(const select::VariableValueNode &) override {}
+ void visitIntegerValueNode(const select::IntegerValueNode &) override {}
+ void visitCurrentTimeValueNode(const select::CurrentTimeValueNode &) override {}
+ void visitStringValueNode(const select::StringValueNode &) override {}
+ void visitNullValueNode(const select::NullValueNode &) override {}
+ void visitInvalidValueNode(const select::InvalidValueNode &) override {}
std::string getVisitString() { return data.str(); }
};
diff --git a/document/src/tests/documentupdatetestcase.cpp b/document/src/tests/documentupdatetestcase.cpp
index 5ac7c48c7ad..baa777ceca1 100644
--- a/document/src/tests/documentupdatetestcase.cpp
+++ b/document/src/tests/documentupdatetestcase.cpp
@@ -33,8 +33,6 @@ using vespalib::tensor::TensorDimensions;
namespace document {
struct DocumentUpdateTest : public CppUnit::TestFixture {
- void setUp() override {}
- void tearDown() override {}
void testSimpleUsage();
void testUpdateApplySingleValue();
diff --git a/document/src/tests/primitivefieldvaluetest.cpp b/document/src/tests/primitivefieldvaluetest.cpp
index ba81e0ebbf6..15fd6e00959 100644
--- a/document/src/tests/primitivefieldvaluetest.cpp
+++ b/document/src/tests/primitivefieldvaluetest.cpp
@@ -1,6 +1,5 @@
// 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/document/fieldvalue/fieldvalues.h>
#include <vespa/document/serialization/vespadocumentdeserializer.h>
#include <vespa/vdstestlib/cppunit/macros.h>
@@ -11,8 +10,6 @@ using vespalib::nbostream;
namespace document {
struct PrimitiveFieldValueTest : public CppUnit::TestFixture {
- void setUp() override {}
- void tearDown() override {}
void testLiterals();
void testRaw();
diff --git a/document/src/tests/serialization/annotationserializer_test.cpp b/document/src/tests/serialization/annotationserializer_test.cpp
index 9be0d6d334e..49860df128d 100644
--- a/document/src/tests/serialization/annotationserializer_test.cpp
+++ b/document/src/tests/serialization/annotationserializer_test.cpp
@@ -1,5 +1,4 @@
// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-// Unit tests for annotation serialization.
#include <vespa/document/base/testdocrepo.h>
#include <vespa/document/annotation/alternatespanlist.h>
diff --git a/document/src/tests/structfieldvaluetest.cpp b/document/src/tests/structfieldvaluetest.cpp
index 0daf8c97302..d6e585e0987 100644
--- a/document/src/tests/structfieldvaluetest.cpp
+++ b/document/src/tests/structfieldvaluetest.cpp
@@ -17,8 +17,6 @@ namespace document {
struct StructFieldValueTest : public CppUnit::TestFixture {
DocumentTypeRepo doc_repo;
StructFieldValueTest();
- void setUp() override {}
- void tearDown() override {}
void testStruct();
void testEmptyStruct();
diff --git a/document/src/tests/testrunner.cpp b/document/src/tests/testrunner.cpp
index aabdbb3f605..815476a3f41 100644
--- a/document/src/tests/testrunner.cpp
+++ b/document/src/tests/testrunner.cpp
@@ -1,13 +1,12 @@
// 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/log/log.h>
#include <vespa/vdstestlib/cppunit/cppunittestrunner.h>
+#include <vespa/log/log.h>
LOG_SETUP("documentcppunittests");
int
-main(int argc, char **argv)
+main(int argc, const char *argv[])
{
vdstestlib::CppUnitTestRunner testRunner;
return testRunner.run(argc, argv);
diff --git a/document/src/tests/teststringutil.h b/document/src/tests/teststringutil.h
index 355d90367ed..cba15682d7e 100644
--- a/document/src/tests/teststringutil.h
+++ b/document/src/tests/teststringutil.h
@@ -1,7 +1,5 @@
// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-/* $Id$*/
-
#pragma once
#include <cppunit/extensions/HelperMacros.h>
diff --git a/document/src/tests/weightedsetfieldvaluetest.cpp b/document/src/tests/weightedsetfieldvaluetest.cpp
index 100db297b55..81b98da297f 100644
--- a/document/src/tests/weightedsetfieldvaluetest.cpp
+++ b/document/src/tests/weightedsetfieldvaluetest.cpp
@@ -1,6 +1,5 @@
// 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/document/fieldvalue/fieldvalues.h>
#include <vespa/document/serialization/vespadocumentdeserializer.h>
#include <vespa/vdstestlib/cppunit/macros.h>
@@ -11,8 +10,6 @@ using vespalib::nbostream;
namespace document {
struct WeightedSetFieldValueTest : public CppUnit::TestFixture {
- void setUp() override {}
- void tearDown() override {}
void testWeightedSet();
void testAddIgnoreZeroWeight();
diff --git a/messagebus_test/src/tests/error/cpp-client.cpp b/messagebus_test/src/tests/error/cpp-client.cpp
index 19cb09b3738..10d7eb7e521 100644
--- a/messagebus_test/src/tests/error/cpp-client.cpp
+++ b/messagebus_test/src/tests/error/cpp-client.cpp
@@ -1,19 +1,15 @@
// 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/log/log.h>
-LOG_SETUP("cpp-client");
+
#include <vespa/messagebus/messagebus.h>
#include <vespa/messagebus/sourcesession.h>
+#include <vespa/messagebus/errorcode.h>
#include <vespa/messagebus/testlib/simplemessage.h>
#include <vespa/messagebus/testlib/simplereply.h>
#include <vespa/messagebus/testlib/simpleprotocol.h>
#include <vespa/messagebus/rpcmessagebus.h>
-#include <vespa/messagebus/errorcode.h>
-#include <vespa/messagebus/iprotocol.h>
-#include <vespa/messagebus/protocolset.h>
#include <vespa/messagebus/sourcesessionparams.h>
#include <vespa/messagebus/testlib/receptor.h>
-#include <vespa/vespalib/util/sync.h>
+#include <vespa/fastos/app.h>
using namespace mbus;
diff --git a/messagebus_test/src/tests/error/cpp-server.cpp b/messagebus_test/src/tests/error/cpp-server.cpp
index 13cfa76984b..c738c871e9a 100644
--- a/messagebus_test/src/tests/error/cpp-server.cpp
+++ b/messagebus_test/src/tests/error/cpp-server.cpp
@@ -1,18 +1,11 @@
// 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/log/log.h>
-LOG_SETUP("cpp-server");
+
#include <vespa/messagebus/messagebus.h>
-#include <vespa/messagebus/destinationsession.h>
-#include <vespa/messagebus/testlib/simplemessage.h>
-#include <vespa/messagebus/testlib/simplereply.h>
#include <vespa/messagebus/testlib/simpleprotocol.h>
#include <vespa/messagebus/rpcmessagebus.h>
-#include <vespa/messagebus/iprotocol.h>
-#include <vespa/messagebus/protocolset.h>
#include <vespa/messagebus/emptyreply.h>
-#include <vespa/messagebus/error.h>
#include <vespa/messagebus/errorcode.h>
+#include <vespa/fastos/app.h>
using namespace mbus;
diff --git a/messagebus_test/src/tests/errorcodes/dumpcodes.cpp b/messagebus_test/src/tests/errorcodes/dumpcodes.cpp
index a381efc2238..81a764d02d9 100644
--- a/messagebus_test/src/tests/errorcodes/dumpcodes.cpp
+++ b/messagebus_test/src/tests/errorcodes/dumpcodes.cpp
@@ -1,9 +1,7 @@
// 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/log/log.h>
-LOG_SETUP("dumpcodes");
+
#include <vespa/messagebus/errorcode.h>
-#include <string>
+#include <vespa/fastos/app.h>
using namespace mbus;
diff --git a/messagebus_test/src/tests/speed/cpp-client.cpp b/messagebus_test/src/tests/speed/cpp-client.cpp
index 54ccadc9ddd..dd3def7efc9 100644
--- a/messagebus_test/src/tests/speed/cpp-client.cpp
+++ b/messagebus_test/src/tests/speed/cpp-client.cpp
@@ -1,16 +1,12 @@
// 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/log/log.h>
-LOG_SETUP("cpp-client");
+
#include <vespa/messagebus/messagebus.h>
#include <vespa/messagebus/routing/retrytransienterrorspolicy.h>
#include <vespa/messagebus/rpcmessagebus.h>
-#include <vespa/messagebus/sourcesession.h>
-#include <vespa/messagebus/sourcesessionparams.h>
#include <vespa/messagebus/testlib/simplemessage.h>
#include <vespa/messagebus/testlib/simpleprotocol.h>
#include <vespa/messagebus/testlib/simplereply.h>
-#include <vespa/vespalib/util/sync.h>
+#include <vespa/fastos/app.h>
using namespace mbus;
diff --git a/messagebus_test/src/tests/speed/cpp-server.cpp b/messagebus_test/src/tests/speed/cpp-server.cpp
index 904bf4d6d51..3d29f5641a2 100644
--- a/messagebus_test/src/tests/speed/cpp-server.cpp
+++ b/messagebus_test/src/tests/speed/cpp-server.cpp
@@ -1,15 +1,11 @@
// 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/log/log.h>
-LOG_SETUP("cpp-server");
+
#include <vespa/messagebus/messagebus.h>
-#include <vespa/messagebus/destinationsession.h>
#include <vespa/messagebus/testlib/simplemessage.h>
#include <vespa/messagebus/testlib/simplereply.h>
#include <vespa/messagebus/testlib/simpleprotocol.h>
#include <vespa/messagebus/rpcmessagebus.h>
-#include <vespa/messagebus/iprotocol.h>
-#include <vespa/messagebus/protocolset.h>
+#include <vespa/fastos/app.h>
using namespace mbus;
diff --git a/messagebus_test/src/tests/trace/cpp-server.cpp b/messagebus_test/src/tests/trace/cpp-server.cpp
index ce495090e91..62ef2f82bad 100644
--- a/messagebus_test/src/tests/trace/cpp-server.cpp
+++ b/messagebus_test/src/tests/trace/cpp-server.cpp
@@ -1,16 +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/log/log.h>
-LOG_SETUP("cpp-server");
+
#include <vespa/messagebus/messagebus.h>
-#include <vespa/messagebus/destinationsession.h>
-#include <vespa/messagebus/testlib/simplemessage.h>
-#include <vespa/messagebus/testlib/simplereply.h>
#include <vespa/messagebus/testlib/simpleprotocol.h>
#include <vespa/messagebus/rpcmessagebus.h>
-#include <vespa/messagebus/iprotocol.h>
-#include <vespa/messagebus/protocolset.h>
#include <vespa/messagebus/emptyreply.h>
+#include <vespa/fastos/app.h>
using namespace mbus;
diff --git a/metrics/src/tests/metricmanagertest.cpp b/metrics/src/tests/metricmanagertest.cpp
index 362cad83a66..0ba6bdfbd2f 100644
--- a/metrics/src/tests/metricmanagertest.cpp
+++ b/metrics/src/tests/metricmanagertest.cpp
@@ -9,8 +9,6 @@
#include <vespa/vdstestlib/cppunit/macros.h>
#include <vespa/vespalib/stllike/asciistream.h>
#include <vespa/vespalib/data/slime/slime.h>
-#include <fstream>
-#include <sstream>
#include <vespa/log/log.h>
LOG_SETUP(".test.metricmanager");
@@ -143,22 +141,20 @@ struct MetricNameVisitor : public MetricVisitor {
MetricNameVisitor(bool debug_ = false) : debug(debug_) {}
- virtual bool visitMetricSet(const MetricSet& metricSet,
- bool autoGenerated) override
- {
+ bool visitMetricSet(const MetricSet& metricSet, bool autoGenerated) override {
if (debug) {
ost << "<" << (autoGenerated ? "*" : "")
<< metricSet.getPath() << ">\n";
}
return true;
}
- virtual void doneVisitingMetricSet(const MetricSet& metricSet) override {
+ void doneVisitingMetricSet(const MetricSet& metricSet) override {
if (debug) {
ost << "</" << metricSet.getPath() << ">\n";
}
}
- virtual bool visitMetric(const Metric& m, bool autoGenerated) override {
+ bool visitMetric(const Metric& m, bool autoGenerated) override {
ost << (autoGenerated ? "*" : "") << m.getPath() << "\n";
return true;
}
@@ -390,7 +386,7 @@ namespace {
struct FakeTimer : public MetricManager::Timer {
time_t _time;
FakeTimer(time_t startTime = 0) : _time(startTime) {}
- virtual time_t getTime() const override { return _time; }
+ time_t getTime() const override { return _time; }
};
struct BriefValuePrinter : public MetricVisitor {
@@ -399,7 +395,7 @@ namespace {
BriefValuePrinter() : count(0), ost() {}
- virtual bool visitMetric(const Metric& metric, bool) override {
+ bool visitMetric(const Metric& metric, bool) override {
if (++count > 1) ost << ",";
//ost << metric.getPath() << ":";
ost << metric.getDoubleValue("value");
diff --git a/metrics/src/tests/metricsettest.cpp b/metrics/src/tests/metricsettest.cpp
index 176572acbd4..2b45bd049e0 100644
--- a/metrics/src/tests/metricsettest.cpp
+++ b/metrics/src/tests/metricsettest.cpp
@@ -1,5 +1,5 @@
// 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/macros.h>
#include <vespa/vespalib/objects/floatingpointtype.h>
#include <vespa/metrics/metrics.h>
@@ -28,7 +28,7 @@ namespace {
TestMetricVisitor(uint32_t setsToVisit_ = 100)
: ost(), setsToVisit(setsToVisit_) {}
- virtual bool visitMetricSet(const MetricSet& set, bool autoGenerated) override {
+ bool visitMetricSet(const MetricSet& set, bool autoGenerated) override {
ost << "[" << (autoGenerated ? "*" : "") << set.getName() << "]\n";
if (setsToVisit > 0) {
--setsToVisit;
@@ -36,7 +36,7 @@ namespace {
}
return false;
}
- virtual bool visitMetric(const Metric& m, bool autoGenerated) override {
+ bool visitMetric(const Metric& m, bool autoGenerated) override {
ost << (autoGenerated ? "*" : "") << m.getName() << "\n";
return true;
}
diff --git a/metrics/src/tests/snapshottest.cpp b/metrics/src/tests/snapshottest.cpp
index bee3e910fb3..5c13a0f82b6 100644
--- a/metrics/src/tests/snapshottest.cpp
+++ b/metrics/src/tests/snapshottest.cpp
@@ -1,6 +1,5 @@
// 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/metrics/metrics.h>
#include <vespa/metrics/loadmetric.hpp>
#include <vespa/metrics/summetric.hpp>
@@ -40,8 +39,8 @@ struct SubSubMetricSet : public MetricSet {
SubSubMetricSet(vespalib::stringref name, const LoadTypeSet& loadTypes_, MetricSet* owner = 0);
~SubSubMetricSet();
- virtual MetricSet* clone(std::vector<Metric::UP> &ownerList, CopyType copyType,
- metrics::MetricSet* owner, bool includeUnused) const override;
+ MetricSet* clone(std::vector<Metric::UP> &ownerList, CopyType copyType,
+ metrics::MetricSet* owner, bool includeUnused) const override;
void incValues();
};
@@ -191,10 +190,8 @@ TestMetricSet::incValues() {
struct FakeTimer : public MetricManager::Timer {
uint32_t _timeInSecs;
-
FakeTimer() : _timeInSecs(1) {}
-
- virtual time_t getTime() const override { return _timeInSecs; }
+ time_t getTime() const override { return _timeInSecs; }
};
} // End of anonymous namespace
diff --git a/metrics/src/tests/stresstest.cpp b/metrics/src/tests/stresstest.cpp
index 5a2a736e9ba..70194ecd861 100644
--- a/metrics/src/tests/stresstest.cpp
+++ b/metrics/src/tests/stresstest.cpp
@@ -1,5 +1,5 @@
// 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/metrics/metrics.h>
#include <vespa/metrics/loadmetric.hpp>
#include <vespa/metrics/summetric.hpp>
@@ -108,7 +108,7 @@ OuterMetricSet::~OuterMetricSet() { }
//std::cerr << "Loadgiver thread joined\n";
}
- virtual void run() override {
+ void run() override {
uint64_t i = 0;
while (running()) {
++i;
diff --git a/metrics/src/tests/testrunner.cpp b/metrics/src/tests/testrunner.cpp
index 5d8dc8d4c1f..9bf86e3276a 100644
--- a/metrics/src/tests/testrunner.cpp
+++ b/metrics/src/tests/testrunner.cpp
@@ -1,14 +1,12 @@
// 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 <iostream>
-#include <vespa/log/log.h>
#include <vespa/vdstestlib/cppunit/cppunittestrunner.h>
+#include <vespa/log/log.h>
LOG_SETUP("storagecppunittests");
int
-main(int argc, char **argv)
+main(int argc, const char *argv[])
{
vdstestlib::CppUnitTestRunner testRunner;
return testRunner.run(argc, argv);
diff --git a/storageframework/src/tests/clock/timetest.cpp b/storageframework/src/tests/clock/timetest.cpp
index ae07559e095..d0367449fe1 100644
--- a/storageframework/src/tests/clock/timetest.cpp
+++ b/storageframework/src/tests/clock/timetest.cpp
@@ -10,9 +10,6 @@ namespace defaultimplementation {
struct TimeTest : public CppUnit::TestFixture
{
- void setUp() override {}
- void tearDown() override {}
-
void testBasics();
void testCreatedFromClock();
void canAssignMicrosecondResolutionTimeToFakeClock();
diff --git a/storageframework/src/tests/memory/memorymanagertest.cpp b/storageframework/src/tests/memory/memorymanagertest.cpp
index 885ae86e832..8b1868a6bd4 100644
--- a/storageframework/src/tests/memory/memorymanagertest.cpp
+++ b/storageframework/src/tests/memory/memorymanagertest.cpp
@@ -155,8 +155,7 @@ MemoryManagerTest::testBasics()
struct ReduceI : public framework::ReduceMemoryUsageInterface {
framework::MemoryToken::UP _token;
- virtual uint64_t reduceMemoryConsumption(const MemoryToken& token, uint64_t reduceBy) override
- {
+ uint64_t reduceMemoryConsumption(const MemoryToken& token, uint64_t reduceBy) override {
assert(&token == _token.get());
(void) &token;
assert(_token->getSize() >= reduceBy);
diff --git a/storageframework/src/tests/memory/memorystatetest.cpp b/storageframework/src/tests/memory/memorystatetest.cpp
index 40d102199d6..5a047a5c790 100644
--- a/storageframework/src/tests/memory/memorystatetest.cpp
+++ b/storageframework/src/tests/memory/memorystatetest.cpp
@@ -2,7 +2,6 @@
#include <vespa/storageframework/defaultimplementation/clock/realclock.h>
#include <vespa/storageframework/defaultimplementation/memory/memorystate.h>
-#include <vespa/storageframework/generic/memory/memorymanagerinterface.h>
#include <vespa/vdstestlib/cppunit/macros.h>
#include <vespa/vespalib/util/exceptions.h>
@@ -12,8 +11,6 @@ namespace defaultimplementation {
struct MemoryStateTest : public CppUnit::TestFixture
{
- void setUp() override {}
- void tearDown() override {}
void testBasics();
@@ -30,15 +27,15 @@ private:
std::map<std::string, framework::MemoryAllocationType> _types;
public:
- virtual void setMaximumMemoryUsage(uint64_t max) override { (void) max; }
+ void setMaximumMemoryUsage(uint64_t max) override { (void) max; }
- virtual const framework::MemoryAllocationType&
+ const framework::MemoryAllocationType&
registerAllocationType(const framework::MemoryAllocationType& type) override {
_types[type.getName()] = type;
return _types[type.getName()];
}
- virtual const framework::MemoryAllocationType&
+ const framework::MemoryAllocationType&
getAllocationType(const std::string& name) const override {
std::map<std::string, framework::MemoryAllocationType>::const_iterator iter =
_types.find(name);
@@ -50,8 +47,7 @@ public:
return iter->second;
}
- virtual std::vector<const MemoryAllocationType*> getAllocationTypes() const override
- {
+ std::vector<const MemoryAllocationType*> getAllocationTypes() const override {
std::vector<const MemoryAllocationType*> types;
for(std::map<std::string, framework::MemoryAllocationType>
::const_iterator it = _types.begin(); it != _types.end(); ++it)
diff --git a/storageframework/src/tests/testrunner.cpp b/storageframework/src/tests/testrunner.cpp
index 0d40a0429d9..5baa0f60b6e 100644
--- a/storageframework/src/tests/testrunner.cpp
+++ b/storageframework/src/tests/testrunner.cpp
@@ -6,7 +6,7 @@
LOG_SETUP("persistencecppunittests");
int
-main(int argc, char **argv)
+main(int argc, const char *argv[])
{
vdstestlib::CppUnitTestRunner testRunner;
return testRunner.run(argc, argv);
diff --git a/storageframework/src/tests/thread/taskthreadtest.cpp b/storageframework/src/tests/thread/taskthreadtest.cpp
index bca5c81ef01..a6698be3676 100644
--- a/storageframework/src/tests/thread/taskthreadtest.cpp
+++ b/storageframework/src/tests/thread/taskthreadtest.cpp
@@ -34,7 +34,7 @@ namespace {
struct MyThread : public TaskThread<Task> {
MyThread(ThreadLock& lock) : TaskThread<Task>(lock) {}
- virtual ThreadWaitInfo doNonCriticalTick(ThreadIndex) override {
+ ThreadWaitInfo doNonCriticalTick(ThreadIndex) override {
return ThreadWaitInfo::NO_MORE_CRITICAL_WORK_KNOWN;
}
};
diff --git a/storageframework/src/tests/thread/tickingthreadtest.cpp b/storageframework/src/tests/thread/tickingthreadtest.cpp
index c65b809e5da..c9d54fe557a 100644
--- a/storageframework/src/tests/thread/tickingthreadtest.cpp
+++ b/storageframework/src/tests/thread/tickingthreadtest.cpp
@@ -13,9 +13,6 @@ namespace defaultimplementation {
struct TickingThreadTest : public CppUnit::TestFixture
{
- void setUp() override {}
- void tearDown() override {}
-
void testTicksBeforeWaitBasic();
void testTicksBeforeWaitLiveUpdate();
void testDestroyWithoutStarting();
@@ -62,7 +59,7 @@ struct MyApp : public TickingThread {
void start(ThreadPool& p) { _threadPool->start(p); }
- virtual ThreadWaitInfo doCriticalTick(ThreadIndex index) override {
+ ThreadWaitInfo doCriticalTick(ThreadIndex index) override {
assert(index < _context.size());
Context& c(_context[index]);
if (_doCritOverlapTest) {
@@ -74,13 +71,12 @@ struct MyApp : public TickingThread {
++c._critTickCount;
return ThreadWaitInfo::NO_MORE_CRITICAL_WORK_KNOWN;
}
- virtual ThreadWaitInfo doNonCriticalTick(ThreadIndex index) override {
+ ThreadWaitInfo doNonCriticalTick(ThreadIndex index) override {
assert(index < _context.size());
Context& c(_context[index]);
++c._nonCritTickCount;
return ThreadWaitInfo::NO_MORE_CRITICAL_WORK_KNOWN;
}
-
uint64_t getMinCritTick() {
uint64_t min = std::numeric_limits<uint64_t>().max();
for (uint32_t i=0; i<_context.size(); ++i) {
@@ -314,7 +310,7 @@ struct BroadcastApp : public TickingThread {
void start(ThreadPool& p) { _threadPool->start(p); }
- virtual ThreadWaitInfo doCriticalTick(ThreadIndex) override {
+ ThreadWaitInfo doCriticalTick(ThreadIndex) override {
if (!_queue.empty()) {
for (uint32_t i=0; i<_queue.size(); ++i) {
printTaskInfo(_queue[i], "activating");
@@ -325,7 +321,7 @@ struct BroadcastApp : public TickingThread {
}
return ThreadWaitInfo::NO_MORE_CRITICAL_WORK_KNOWN;
}
- virtual ThreadWaitInfo doNonCriticalTick(ThreadIndex) override {
+ ThreadWaitInfo doNonCriticalTick(ThreadIndex) override {
if (!_active.empty()) {
for (uint32_t i=0; i<_active.size(); ++i) {
printTaskInfo(_queue[i], "processing");
diff --git a/storageserver/src/tests/testrunner.cpp b/storageserver/src/tests/testrunner.cpp
index 5d8dc8d4c1f..70c4b4cdb5c 100644
--- a/storageserver/src/tests/testrunner.cpp
+++ b/storageserver/src/tests/testrunner.cpp
@@ -1,14 +1,11 @@
// 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 <iostream>
-#include <vespa/log/log.h>
#include <vespa/vdstestlib/cppunit/cppunittestrunner.h>
-
+#include <vespa/log/log.h>
LOG_SETUP("storagecppunittests");
int
-main(int argc, char **argv)
+main(int argc, const char *argv[])
{
vdstestlib::CppUnitTestRunner testRunner;
return testRunner.run(argc, argv);
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[]);
};
diff --git a/vespaclient/src/vespa/vespaclient/spoolmaster/application.h b/vespaclient/src/vespa/vespaclient/spoolmaster/application.h
index 87f628e631c..2a20dd1b290 100644
--- a/vespaclient/src/vespa/vespaclient/spoolmaster/application.h
+++ b/vespaclient/src/vespa/vespaclient/spoolmaster/application.h
@@ -1,9 +1,9 @@
// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#pragma once
+#include <vespa/fastos/app.h>
#include <string>
#include <vector>
-#include <vespa/fastos/app.h>
namespace spoolmaster {
/**
@@ -23,19 +23,9 @@ private:
bool findOutboxes();
void moveLinks();
public:
- /**
- * Constructs a new spoolmaster object.
- */
Application();
-
- /**
- * Destructor. Frees any allocated resources.
- */
- virtual ~Application();
-
- // Implements FastOS_Application.
+ ~Application();
int Main() override;
};
}
-
diff --git a/vespaclient/src/vespa/vespaclient/vespadoclocator/application.h b/vespaclient/src/vespa/vespaclient/vespadoclocator/application.h
index 2e50ffde2c0..fdb4129a188 100644
--- a/vespaclient/src/vespa/vespaclient/vespadoclocator/application.h
+++ b/vespaclient/src/vespa/vespaclient/vespadoclocator/application.h
@@ -17,7 +17,6 @@ private:
bool printDocumentLocation(Locator &locator, const std::string &docId);
public:
- // Implements FastOS_Application.
int Main() override;
};
diff --git a/vespaclient/src/vespa/vespaclient/vesparoute/application.h b/vespaclient/src/vespa/vespaclient/vesparoute/application.h
index e7eefb7f16d..e77b70f1454 100644
--- a/vespaclient/src/vespa/vespaclient/vesparoute/application.h
+++ b/vespaclient/src/vespa/vespaclient/vesparoute/application.h
@@ -64,13 +64,9 @@ private:
std::vector<std::string> &oos, std::set<std::string> &errors) const;
public:
- /** Null member variables. */
Application();
~Application();
-
- // Inherit doc from FastOS_Application.
int Main() override;
};
}
-
diff --git a/vespaclient/src/vespa/vespaclient/vesparoute/mynetwork.h b/vespaclient/src/vespa/vespaclient/vesparoute/mynetwork.h
index f9737d1de9a..4c50ec9cb38 100644
--- a/vespaclient/src/vespa/vespaclient/vesparoute/mynetwork.h
+++ b/vespaclient/src/vespa/vespaclient/vesparoute/mynetwork.h
@@ -21,11 +21,7 @@ public:
// Overrides RPCNetwork.
bool allocServiceAddress(mbus::RoutingNode &recipient) override;
-
- // Overrides RPCNetwork.
void freeServiceAddress(mbus::RoutingNode &recipient) override;
-
- // Overrides RPCNetwork.
void send(const mbus::Message &msg, const std::vector<mbus::RoutingNode*> &recipients) override;
/**
@@ -43,4 +39,3 @@ public:
*/
void removeNodes(std::vector<mbus::RoutingNode*> &nodes);
};
-