Skip to content
Snippets Groups Projects
Commit 1b8ebd54 authored by Steven Murray's avatar Steven Murray
Browse files

Added unit_tests directory

parent 87e85017
No related branches found
No related tags found
No related merge requests found
......@@ -8,5 +8,6 @@ set(CMAKE_C_FLAGS_RELWITHDEBINFO "-g")
set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-g")
add_subdirectory(libs)
add_subdirectory(unit_tests)
add_subdirectory(xroot_clients)
add_subdirectory(xroot_plugins)
#include "cta/filesystem/DirectoryConstIterator.hpp"
cta::filesystem::DirectoryConstIterator::~DirectoryConstIterator() throw() {
}
......@@ -22,6 +22,11 @@ namespace filesystem {
class DirectoryConstIterator {
public:
/**
* Destructor.
*/
virtual ~DirectoryConstIterator() throw();
/**
* Returns true if there are more directory entries.
*
......
cmake_minimum_required (VERSION 2.6)
include_directories(${CMAKE_CURRENT_SOURCE_DIR})
add_executable(unittests
unit_tests.cpp)
target_link_libraries(unittests
gmock
gtest
pthread)
#include <gtest/gtest.h>
#include <gmock/gmock.h>
int main(int argc, char** argv) {
// The following line must be executed to initialize Google Mock
// (and Google Test) before running the tests.
::testing::InitGoogleMock(&argc, argv);
int ret = RUN_ALL_TESTS();
// Close standard in, out and error so that valgrind can be used with the
// following command-line to track open file-descriptors:
//
// valgrind --track-fds=yes
close(0);
close(1);
close(2);
return ret;
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment