summaryrefslogtreecommitdiffstats
path: root/vdslib
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2017-04-25 18:22:00 +0200
committerHenning Baldersheim <balder@yahoo-inc.com>2017-04-25 18:22:00 +0200
commitd9a33c05e2b3f45cba50fd0f8c48c422541b1ee8 (patch)
tree1d97192477c4d2eaf51ead0f3c6f5873653b99da /vdslib
parent575f2d7572ac68f9dfc6c6e0d4ea4240c3aac2e8 (diff)
Add missing override.
remove virtual on override. optimize includes.
Diffstat (limited to 'vdslib')
-rw-r--r--vdslib/src/tests/bucketdistribution/bucketdistributiontest.cpp6
-rw-r--r--vdslib/src/tests/container/documentlisttest.cpp13
-rw-r--r--vdslib/src/tests/container/documentsummarytest.cpp3
-rw-r--r--vdslib/src/tests/container/parameterstest.cpp3
-rw-r--r--vdslib/src/tests/container/searchresulttest.cpp3
-rw-r--r--vdslib/src/tests/distribution/bucketvector.cpp5
-rw-r--r--vdslib/src/tests/distribution/bucketvector.h2
-rw-r--r--vdslib/src/tests/distribution/datadistributiontest.cpp15
-rw-r--r--vdslib/src/tests/distribution/grouptest.cpp2
-rw-r--r--vdslib/src/tests/distribution/randombucket.cpp5
-rw-r--r--vdslib/src/tests/distribution/randombucket.h2
-rw-r--r--vdslib/src/tests/state/grouptest.cpp6
-rw-r--r--vdslib/src/tests/state/nodestatetest.cpp5
-rw-r--r--vdslib/src/tests/testrunner.cpp5
-rw-r--r--vdslib/src/tests/thread/taskschedulertest.cpp1
15 files changed, 24 insertions, 52 deletions
diff --git a/vdslib/src/tests/bucketdistribution/bucketdistributiontest.cpp b/vdslib/src/tests/bucketdistribution/bucketdistributiontest.cpp
index 589d7b66e96..89879ef9d7a 100644
--- a/vdslib/src/tests/bucketdistribution/bucketdistributiontest.cpp
+++ b/vdslib/src/tests/bucketdistribution/bucketdistributiontest.cpp
@@ -1,7 +1,4 @@
// 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(".bucketdistributiontest");
#include <cppunit/extensions/HelperMacros.h>
#include <vespa/vdslib/bucketdistribution.h>
@@ -10,8 +7,6 @@ using namespace vdslib;
class BucketDistributionTest : public CppUnit::TestFixture {
public:
- void setUp() override { }
- void tearDown() override { }
void testDistribution();
void testNumBucketBits();
@@ -29,7 +24,6 @@ CPPUNIT_TEST_SUITE_REGISTRATION(BucketDistributionTest);
void BucketDistributionTest::testDistribution()
{
- LOG(info, "testDistribution");
const uint32_t expected4[] = {
10, 11, 9, 6, 4, 8, 14, 1, 13, 2, 12, 3, 5, 7, 15, 0 };
assertDistribution(16, 4, expected4);
diff --git a/vdslib/src/tests/container/documentlisttest.cpp b/vdslib/src/tests/container/documentlisttest.cpp
index 2c72e29787e..5120c4efa05 100644
--- a/vdslib/src/tests/container/documentlisttest.cpp
+++ b/vdslib/src/tests/container/documentlisttest.cpp
@@ -1,20 +1,13 @@
// 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/vdslib/container/writabledocumentlist.h>
-
-#include <cppunit/extensions/HelperMacros.h>
#include <vespa/document/base/testdocman.h>
-#include <vespa/document/config/config-documenttypes.h>
-#include <vespa/document/fieldvalue/document.h>
-#include <vespa/document/repo/documenttyperepo.h>
#include <vespa/document/update/assignvalueupdate.h>
#include <vespa/document/update/documentupdate.h>
#include <vespa/vespalib/objects/nbostream.h>
#include <vespa/vespalib/util/random.h>
#include <vespa/vespalib/testkit/testapp.h>
-#include <vespa/vespalib/util/vstringfmt.h>
-#include <iostream>
+#include <cppunit/extensions/HelperMacros.h>
using document::DocumentTypeRepo;
using document::readDocumenttypesConfig;
@@ -522,14 +515,14 @@ void WritableDocumentListTest::testOperationList()
for (uint32_t i=0; i<3000; ++i, it++) {
CPPUNIT_ASSERT_EQUAL(
- vespalib::make_vespa_string("userdoc:test:1298798789:%d", i),
+ vespalib::make_string("userdoc:test:1298798789:%d", i),
it->getDocument()->getId().toString());
CPPUNIT_ASSERT(!it->isRemoveEntry());
}
for (uint32_t i=5000; i<5900; ++i, it++) {
CPPUNIT_ASSERT_EQUAL(
- vespalib::make_vespa_string("userdoc:test:1298798789:%d", i),
+ vespalib::make_string("userdoc:test:1298798789:%d", i),
it->getDocument()->getId().toString());
CPPUNIT_ASSERT(it->isRemoveEntry());
}
diff --git a/vdslib/src/tests/container/documentsummarytest.cpp b/vdslib/src/tests/container/documentsummarytest.cpp
index 80547e28d1f..86684420278 100644
--- a/vdslib/src/tests/container/documentsummarytest.cpp
+++ b/vdslib/src/tests/container/documentsummarytest.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 <cppunit/extensions/HelperMacros.h>
#include <vespa/document/base/testdocman.h>
#include <vespa/vdslib/container/documentsummary.h>
+#include <cppunit/extensions/HelperMacros.h>
namespace vdslib {
diff --git a/vdslib/src/tests/container/parameterstest.cpp b/vdslib/src/tests/container/parameterstest.cpp
index 63ab18bcd26..4e34e48eef0 100644
--- a/vdslib/src/tests/container/parameterstest.cpp
+++ b/vdslib/src/tests/container/parameterstest.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 <cppunit/extensions/HelperMacros.h>
#include <vespa/document/repo/documenttyperepo.h>
#include <vespa/vdslib/container/parameters.h>
+#include <cppunit/extensions/HelperMacros.h>
using document::DocumentTypeRepo;
using namespace vdslib;
diff --git a/vdslib/src/tests/container/searchresulttest.cpp b/vdslib/src/tests/container/searchresulttest.cpp
index b72df61c2dd..d26424dba06 100644
--- a/vdslib/src/tests/container/searchresulttest.cpp
+++ b/vdslib/src/tests/container/searchresulttest.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 <cppunit/extensions/HelperMacros.h>
#include <vespa/document/base/testdocman.h>
#include <vespa/vdslib/container/searchresult.h>
+#include <cppunit/extensions/HelperMacros.h>
namespace vdslib {
diff --git a/vdslib/src/tests/distribution/bucketvector.cpp b/vdslib/src/tests/distribution/bucketvector.cpp
index 789f85aa034..9cda8741f42 100644
--- a/vdslib/src/tests/distribution/bucketvector.cpp
+++ b/vdslib/src/tests/distribution/bucketvector.cpp
@@ -1,11 +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 <tests/distribution/bucketvector.h>
+#include "bucketvector.h"
#include <limits>
#include <iostream>
#include <algorithm>
-#include <vespa/document/bucket/bucketid.h>
-
namespace BucketVector{
diff --git a/vdslib/src/tests/distribution/bucketvector.h b/vdslib/src/tests/distribution/bucketvector.h
index b9499de933a..9515ab85fb9 100644
--- a/vdslib/src/tests/distribution/bucketvector.h
+++ b/vdslib/src/tests/distribution/bucketvector.h
@@ -4,7 +4,6 @@
#include <vector>
#include <vespa/document/bucket/bucketid.h>
-
namespace BucketVector{
void reserve(size_t capacity);
@@ -13,4 +12,3 @@ namespace BucketVector{
void getBuckets(uint32_t distributionBits, std::vector<document::BucketId>& buckets);
void printVector();
}
-
diff --git a/vdslib/src/tests/distribution/datadistributiontest.cpp b/vdslib/src/tests/distribution/datadistributiontest.cpp
index f81e0992756..e87d7b9754f 100644
--- a/vdslib/src/tests/distribution/datadistributiontest.cpp
+++ b/vdslib/src/tests/distribution/datadistributiontest.cpp
@@ -1,15 +1,16 @@
// 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 <cppunit/extensions/HelperMacros.h>
-#include <list>
-#include <vespa/document/bucket/bucketidfactory.h>
+#include "bucketvector.h"
+#include "randombucket.h"
#include <vespa/vdslib/distribution/distribution.h>
#include <vespa/vdslib/state/clusterstate.h>
#include <vespa/vdslib/state/random.h>
-#include <ctime>
-#include <tests/distribution/bucketvector.h>
-#include <tests/distribution/randombucket.h>
+#include <vespa/document/bucket/bucketidfactory.h>
+#include <cppunit/extensions/HelperMacros.h>
#include <fstream>
+#include <list>
+#include <ctime>
+
+
using std::cout;
using std::ios;
diff --git a/vdslib/src/tests/distribution/grouptest.cpp b/vdslib/src/tests/distribution/grouptest.cpp
index b182c19d072..db9cd69dad6 100644
--- a/vdslib/src/tests/distribution/grouptest.cpp
+++ b/vdslib/src/tests/distribution/grouptest.cpp
@@ -1,8 +1,6 @@
// 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/vdslib/distribution/group.h>
-
#include <vespa/vespalib/text/stringtokenizer.h>
#include <vespa/vdstestlib/cppunit/macros.h>
diff --git a/vdslib/src/tests/distribution/randombucket.cpp b/vdslib/src/tests/distribution/randombucket.cpp
index 57b6798068e..ab0f474b75e 100644
--- a/vdslib/src/tests/distribution/randombucket.cpp
+++ b/vdslib/src/tests/distribution/randombucket.cpp
@@ -1,8 +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 "randombucket.h"
#include <vespa/vdslib/state/random.h>
-#include <tests/distribution/randombucket.h>
-#include <iostream>
namespace RandomBucket{
diff --git a/vdslib/src/tests/distribution/randombucket.h b/vdslib/src/tests/distribution/randombucket.h
index fcede950c52..6e8d4b7ddc6 100644
--- a/vdslib/src/tests/distribution/randombucket.h
+++ b/vdslib/src/tests/distribution/randombucket.h
@@ -1,4 +1,5 @@
// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+
#pragma once
namespace RandomBucket{
@@ -8,4 +9,3 @@ namespace RandomBucket{
uint64_t get();
void setSeed(int seed=-1);
}
-
diff --git a/vdslib/src/tests/state/grouptest.cpp b/vdslib/src/tests/state/grouptest.cpp
index c61f1e37bb9..f79f040f2b7 100644
--- a/vdslib/src/tests/state/grouptest.cpp
+++ b/vdslib/src/tests/state/grouptest.cpp
@@ -1,12 +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 <boost/lexical_cast.hpp>
-#include <cppunit/extensions/HelperMacros.h>
#include <vespa/vdslib/state/nodetype.h>
#include <vdslib/state/group.h>
#include <vespa/vdslib/state/idealgroup.h>
#include <vespa/vespalib/util/exceptions.h>
-#include <iostream>
+#include <cppunit/extensions/HelperMacros.h>
+#include <boost/lexical_cast.hpp>
#include <algorithm>
using namespace std;
diff --git a/vdslib/src/tests/state/nodestatetest.cpp b/vdslib/src/tests/state/nodestatetest.cpp
index e479dc70013..2d87495de7f 100644
--- a/vdslib/src/tests/state/nodestatetest.cpp
+++ b/vdslib/src/tests/state/nodestatetest.cpp
@@ -1,8 +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 <cppunit/extensions/HelperMacros.h>
+
#include <vespa/vdslib/state/nodestate.h>
-#include <iostream>
+#include <cppunit/extensions/HelperMacros.h>
namespace storage {
namespace lib {
diff --git a/vdslib/src/tests/testrunner.cpp b/vdslib/src/tests/testrunner.cpp
index fef61af9a17..0c5dcd1d00a 100644
--- a/vdslib/src/tests/testrunner.cpp
+++ b/vdslib/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("vdslibcppunittestrunner");
int
-main(int argc, char **argv)
+main(int argc, const char *argv[])
{
vdstestlib::CppUnitTestRunner testRunner;
return testRunner.run(argc, argv);
diff --git a/vdslib/src/tests/thread/taskschedulertest.cpp b/vdslib/src/tests/thread/taskschedulertest.cpp
index 22529a9f37a..a48f9d20214 100644
--- a/vdslib/src/tests/thread/taskschedulertest.cpp
+++ b/vdslib/src/tests/thread/taskschedulertest.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/vdslib/thread/taskscheduler.h>
#include <vespa/vdstestlib/cppunit/macros.h>