From 7d757331d629305feb7bf6e85f37d340cf771845 Mon Sep 17 00:00:00 2001 From: Guilherme Maciel Ferreira Date: Sat, 21 Jan 2012 11:22:58 -0200 Subject: [PATCH] Test: keep mock class definition within header to reduce the amount of files, once the mock implementation is empty. --- test/CMakeLists.test_hoststatusanalyzer.txt | 1 - test/mock_linkstatusanalyzer.cpp | 39 --------------------------- test/mock_linkstatusanalyzer.h | 18 ++++++++++++ 3 files changed, 18 insertions(+), 40 deletions(-) delete mode 100644 test/mock_linkstatusanalyzer.cpp diff --git a/test/CMakeLists.test_hoststatusanalyzer.txt b/test/CMakeLists.test_hoststatusanalyzer.txt index 5ac0172..901dead 100644 --- a/test/CMakeLists.test_hoststatusanalyzer.txt +++ b/test/CMakeLists.test_hoststatusanalyzer.txt @@ -1,7 +1,6 @@ # compiler: creates the binaries add_executable(test_hoststatusanalyzer test_hoststatusanalyzer.cpp - mock_linkstatusanalyzer.cpp ${CMAKE_SOURCE_DIR}/src/host/hoststatusanalyzer.cpp ) diff --git a/test/mock_linkstatusanalyzer.cpp b/test/mock_linkstatusanalyzer.cpp deleted file mode 100644 index 722733b..0000000 --- a/test/mock_linkstatusanalyzer.cpp +++ /dev/null @@ -1,39 +0,0 @@ -/* -The software in this package is distributed under the GNU General -Public License version 2 (with a special exception described below). - -A copy of GNU General Public License (GPL) is included in this distribution, -in the file COPYING.GPL. - -As a special exception, if other files instantiate templates or use macros -or inline functions from this file, or you compile this file and link it -with other works to produce a work based on this file, this file -does not by itself cause the resulting work to be covered -by the GNU General Public License. - -However the source code for this file must still be made available -in accordance with section (3) of the GNU General Public License. - -This exception does not invalidate any other reasons why a work based -on this file might be covered by the GNU General Public License. -*/ - -#include "mock_linkstatusanalyzer.h" - -using namespace std; - -LinkStatusAnalyzer::LinkStatusAnalyzer() -{ -} - -LinkStatusAnalyzer::~LinkStatusAnalyzer() -{ -} - -void LinkStatusAnalyzer::notify_host_up( const string &host_address ) -{ -} - -void LinkStatusAnalyzer::notify_host_down( const string &host_address ) -{ -} diff --git a/test/mock_linkstatusanalyzer.h b/test/mock_linkstatusanalyzer.h index d116b13..017501f 100644 --- a/test/mock_linkstatusanalyzer.h +++ b/test/mock_linkstatusanalyzer.h @@ -45,6 +45,24 @@ public: }; //----------------------------------------------------------------------------- + +LinkStatusAnalyzer::LinkStatusAnalyzer() +{ +} + +LinkStatusAnalyzer::~LinkStatusAnalyzer() +{ +} + +void LinkStatusAnalyzer::notify_host_up( const std::string &host_address ) +{ +} + +void LinkStatusAnalyzer::notify_host_down( const std::string &host_address ) +{ +} + +//----------------------------------------------------------------------------- // LinkStatusAnalyzerItem //----------------------------------------------------------------------------- -- 1.7.1