diff options
Diffstat (limited to 'storageframework/src/tests')
6 files changed, 11 insertions, 23 deletions
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"); |