summaryrefslogtreecommitdiff
path: root/src/Bottleneck/test
diff options
context:
space:
mode:
authorvrouvrea <vrouvrea@636b058d-ea47-450e-bf9e-a15bfbe3eedb>2017-01-16 09:20:20 +0000
committervrouvrea <vrouvrea@636b058d-ea47-450e-bf9e-a15bfbe3eedb>2017-01-16 09:20:20 +0000
commitdf601fe3e27210133e3551352382be779a4408ca (patch)
tree9cd934f71a340540c798e8c92076625f1992b3ad /src/Bottleneck/test
parenta2977f4038b8cfc375f037de7c5c805a9079f9f7 (diff)
parente3707de64413df06f83770a40ed8ba4ad9a69951 (diff)
Merge last trunk modifications
git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/branches/distance_matrix_in_rips_module@1938 636b058d-ea47-450e-bf9e-a15bfbe3eedb Former-commit-id: 8af39a00b9134dbcc77883412c29d7184479979b
Diffstat (limited to 'src/Bottleneck/test')
-rw-r--r--src/Bottleneck/test/CMakeLists.txt21
-rw-r--r--src/Bottleneck/test/README12
-rw-r--r--src/Bottleneck/test/bottleneck_unit_test.cpp26
3 files changed, 0 insertions, 59 deletions
diff --git a/src/Bottleneck/test/CMakeLists.txt b/src/Bottleneck/test/CMakeLists.txt
deleted file mode 100644
index 9d88ab25..00000000
--- a/src/Bottleneck/test/CMakeLists.txt
+++ /dev/null
@@ -1,21 +0,0 @@
-cmake_minimum_required(VERSION 2.6)
-project(Bottleneck_tests)
-
-if (GCOVR_PATH)
- # for gcovr to make coverage reports - Corbera Jenkins plugin
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fprofile-arcs -ftest-coverage")
-endif()
-if (GPROF_PATH)
- # for gprof to make coverage reports - Jenkins
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pg")
-endif()
-
-add_executable ( BottleneckUT bottleneck_unit_test.cpp )
-target_link_libraries(BottleneckUT ${Boost_SYSTEM_LIBRARY} ${Boost_UNIT_TEST_FRAMEWORK_LIBRARY})
-
-# Unitary tests
-add_test(NAME BottleneckUT
- COMMAND ${CMAKE_CURRENT_BINARY_DIR}/BottleneckUT
- # XML format for Jenkins xUnit plugin
- --log_format=XML --log_sink=${CMAKE_SOURCE_DIR}/BottleneckUT.xml --log_level=test_suite --report_level=no)
-
diff --git a/src/Bottleneck/test/README b/src/Bottleneck/test/README
deleted file mode 100644
index 0e7b8673..00000000
--- a/src/Bottleneck/test/README
+++ /dev/null
@@ -1,12 +0,0 @@
-To compile:
-***********
-
-cmake .
-make
-
-To launch with details:
-***********************
-
-./BottleneckUnitTest --report_level=detailed --log_level=all
-
- ==> echo $? returns 0 in case of success (non-zero otherwise)
diff --git a/src/Bottleneck/test/bottleneck_unit_test.cpp b/src/Bottleneck/test/bottleneck_unit_test.cpp
deleted file mode 100644
index c60f5d8a..00000000
--- a/src/Bottleneck/test/bottleneck_unit_test.cpp
+++ /dev/null
@@ -1,26 +0,0 @@
-#define BOOST_TEST_DYN_LINK
-#define BOOST_TEST_MODULE "bottleneck"
-#include <boost/test/unit_test.hpp>
-
-#include "gudhi/Graph_matching.h"
-#include <iostream>
-
-using namespace Gudhi::bottleneck;
-
-BOOST_AUTO_TEST_CASE(random_diagrams) {
- int n = 100;
- // Random construction
- std::vector< std::pair<double, double> > v1, v2;
- for (int i = 0; i < n; i++) {
- int a = rand() % n;
- v1.emplace_back(a, a + rand() % (n - a));
- int b = rand() % n;
- v2.emplace_back(b, b + rand() % (n - b));
- }
- // v1 and v2 are persistence diagrams containing each 100 randoms points.
- double b = bottleneck_distance(v1, v2, 0);
- //
- std::cout << b << std::endl;
- const double EXPECTED_DISTANCE = 98.5;
- BOOST_CHECK(b == EXPECTED_DISTANCE);
-}