Skip to content

Commit bdf10fd

Browse files
author
Stephan Vivie
committed
Testing no longer requires BMPTK
See wiki for details on how to test
1 parent e316d32 commit bdf10fd

12 files changed

+62
-150
lines changed

.gitignore

+4-1
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,7 @@
2525
# Executables
2626
*.exe
2727
*.out
28-
*.app
28+
*.app
29+
30+
# Build directory
31+
build/*

CMakeLists.txt

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
cmake_minimum_required(VERSION 2.8.9)
2+
project(adt)
3+
find_package (Threads)
4+
5+
file(GLOB SOURCES "source/src/*.cpp" "source/include/*.hpp")
6+
file(GLOB SOURCES_GTEST "source/src/*.cpp" "source/include/*.hpp" "test/*.cpp" "test/*.hpp")
7+
list(REMOVE_ITEM SOURCES_GTEST ${CMAKE_CURRENT_SOURCE_DIR}/source/src/main.cpp)
8+
9+
include_directories(
10+
../deps/gtest-1.7.0/include
11+
../deps/gtest-1.7.0)
12+
13+
link_directories(../deps/gtest-1.7.0/src)
14+
ADD_LIBRARY(gtest ../deps/gtest-1.7.0/src/gtest-all.cc)
15+
ADD_LIBRARY(gtest_main ../deps/gtest-1.7.0/src/gtest_main.cc)
16+
17+
add_executable(ADT ${SOURCES})
18+
add_executable(ADT_test ${GTEST} ${SOURCES_GTEST})
19+
target_link_libraries(ADT_test gtest gtest_main ${CMAKE_THREAD_LIBS_INIT})

Duration.hpp

-48
This file was deleted.

Makefile

-27
This file was deleted.

Moment.hpp

-50
This file was deleted.

README.md

-9 Bytes

��# adt

ADT

docs/.gitignore

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# Ignore everything in this directory
2+
*
3+
# Except this file
4+
!.gitignore

main.cpp

-9
This file was deleted.

source/src/main.cpp

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#include <stdio.h>
2+
#include <iostream>
3+
4+
int main() {
5+
std::cout << "Hello world";
6+
}

test/Main_TestAll.cpp

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#include <limits.h>
2+
#include "gtest/gtest.h"
3+
4+
int main(int argc, char **argv) {
5+
::testing::InitGoogleTest(&argc, argv);
6+
return RUN_ALL_TESTS();
7+
}

test/SampleTest.cpp

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
#include <limits.h>
2+
#include "gtest/gtest.h"
3+
4+
class SampleTest : public ::testing::Test {
5+
protected:
6+
virtual void SetUp() {
7+
}
8+
9+
virtual void TearDown() {
10+
}
11+
};
12+
13+
14+
TEST(Sample,Sample)
15+
{
16+
EXPECT_EQ(1,1);
17+
}
18+
19+
TEST(Sample,SampleFail)
20+
{
21+
EXPECT_EQ(1,0);
22+
}

tests/BoxTest.cpp

-15
This file was deleted.

0 commit comments

Comments
 (0)