Skip to content

Commit

Permalink
Fix warnigns in tests
Browse files Browse the repository at this point in the history
Signed-off-by: Björn Svensson <[email protected]>
  • Loading branch information
bjosv committed Dec 5, 2024
1 parent f0c5f5d commit 45127b4
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 49 deletions.
6 changes: 3 additions & 3 deletions src/lib/handle_mgr/test/handlemgrtest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -62,13 +62,13 @@ class MyProgressListener : public CppUnit::TextTestProgressListener
}

void startTest(CppUnit::Test *test) {
(test);
(void)test;
start = clock();
}

void endTestRun(CppUnit::Test *test,
CppUnit::TestResult *eventManager) {
(eventManager); (test);
(void)eventManager; (void)test;
end = clock();
duration= double(end - start)/ CLOCKS_PER_SEC;
CppUnit::stdCOut() << "duration " << TimeFormat(duration);
Expand All @@ -80,7 +80,7 @@ class MyProgressListener : public CppUnit::TextTestProgressListener
}

void endTest(CPPUNIT_NS::Test *test) {
(test);
(void)test;
}

double durationTest() const {
Expand Down
29 changes: 0 additions & 29 deletions src/lib/session_mgr/test/sessionmgrtest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -79,32 +79,6 @@ std::auto_ptr<BotanCryptoFactory> BotanCryptoFactory::instance(NULL);

#endif

class MyProgressListener : public CppUnit::TextTestProgressListener
{
void startTest(CppUnit::Test *test) {
bool t = true;
}

void endTestRun(CppUnit::Test *test,
CppUnit::TestResult *eventManager) {
bool t = true;
}
private:
std::string m_name;
};

class MyListener : public CPPUNIT_NS::TestListener {
virtual void startTest( CPPUNIT_NS::Test*const pTest ) {
std::cout << std::endl << pTest->getName() << ' ' << pTest->countTestCases() << std::endl << std::endl;
}
virtual void addFailure( const CPPUNIT_NS::TestFailure & failure ) {
const CPPUNIT_NS::SourceLine solurceLine( failure.sourceLine() );
CPPUNIT_NS::Message message( failure.thrownException()->message() );
std::cout << solurceLine.fileName() << ' ' << solurceLine.lineNumber() << ' ' << message.shortDescription() << std::endl;
std::cout << message.details() << std::endl << std::endl;
}
};

int main(int /*argc*/, char** /*argv*/)
{
CppUnit::TestResult controller;
Expand All @@ -116,9 +90,6 @@ int main(int /*argc*/, char** /*argv*/)
CppUnit::BriefTestProgressListener progressListener;
controller.addListener(&progressListener);

MyProgressListener progress;
controller.addListener(&progress);

runner.addTest(registry.makeTest());
runner.run(controller);

Expand Down
17 changes: 0 additions & 17 deletions src/lib/slot_mgr/test/slotmgrtest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -73,20 +73,6 @@ std::auto_ptr<BotanCryptoFactory> BotanCryptoFactory::instance(NULL);

#endif

class MyProgressListener : public CppUnit::TextTestProgressListener
{
void startTest(CppUnit::Test *test) {
bool t = true;
}

void endTestRun(CppUnit::Test *test,
CppUnit::TestResult *eventManager) {
bool t = true;
}
private:
std::string m_name;
};

int main(int /*argc*/, char** /*argv*/)
{
CppUnit::TestResult controller;
Expand All @@ -98,9 +84,6 @@ int main(int /*argc*/, char** /*argv*/)
CppUnit::BriefTestProgressListener progressListener;
controller.addListener(&progressListener);

MyProgressListener progress;
controller.addListener(&progress);

runner.addTest(registry.makeTest());
runner.run(controller);

Expand Down

0 comments on commit 45127b4

Please sign in to comment.