summaryrefslogtreecommitdiff
path: root/src/common
diff options
context:
space:
mode:
authorvrouvrea <vrouvrea@636b058d-ea47-450e-bf9e-a15bfbe3eedb>2016-09-19 21:24:07 +0000
committervrouvrea <vrouvrea@636b058d-ea47-450e-bf9e-a15bfbe3eedb>2016-09-19 21:24:07 +0000
commitd04f3f02858044180471fc7e38948ff73e330162 (patch)
tree74d3dbf53df3267f32d9ce34a350615ca5e58847 /src/common
parent5cdf5825e0e5a937c5bbc5cee49ed9aa34f0af0e (diff)
parentca4f5e87e79701e48bb8697b19250be1b67c5f77 (diff)
Merge of warning_fix branch
git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/trunk@1512 636b058d-ea47-450e-bf9e-a15bfbe3eedb Former-commit-id: 8fd75ab3cb6a02013df18f6d5048755d39524b70
Diffstat (limited to 'src/common')
-rw-r--r--src/common/example/example_CGAL_points_off_reader.cpp2
-rw-r--r--src/common/example/example_vector_double_points_off_reader.cpp2
-rw-r--r--src/common/include/gudhi/Test.h105
3 files changed, 2 insertions, 107 deletions
diff --git a/src/common/example/example_CGAL_points_off_reader.cpp b/src/common/example/example_CGAL_points_off_reader.cpp
index 264231b2..4522174a 100644
--- a/src/common/example/example_CGAL_points_off_reader.cpp
+++ b/src/common/example/example_CGAL_points_off_reader.cpp
@@ -37,7 +37,7 @@ int main(int argc, char **argv) {
int n {0};
for (auto point : point_cloud) {
std::cout << "Point[" << n << "] = ";
- for (int i {0}; i < point.size(); i++)
+ for (std::size_t i {0}; i < point.size(); i++)
std::cout << point[i] << " ";
std::cout << "\n";
++n;
diff --git a/src/common/example/example_vector_double_points_off_reader.cpp b/src/common/example/example_vector_double_points_off_reader.cpp
index f691db92..8aecb26e 100644
--- a/src/common/example/example_vector_double_points_off_reader.cpp
+++ b/src/common/example/example_vector_double_points_off_reader.cpp
@@ -32,7 +32,7 @@ int main(int argc, char **argv) {
int n {0};
for (auto point : point_cloud) {
std::cout << "Point[" << n << "] = ";
- for (int i {0}; i < point.size(); i++)
+ for (std::size_t i {0}; i < point.size(); i++)
std::cout << point[i] << " ";
std::cout << "\n";
++n;
diff --git a/src/common/include/gudhi/Test.h b/src/common/include/gudhi/Test.h
deleted file mode 100644
index 6024c822..00000000
--- a/src/common/include/gudhi/Test.h
+++ /dev/null
@@ -1,105 +0,0 @@
-/* This file is part of the Gudhi Library. The Gudhi library
- * (Geometric Understanding in Higher Dimensions) is a generic C++
- * library for computational topology.
- *
- * Author(s): David Salinas
- *
- * Copyright (C) 2014 INRIA Sophia Antipolis-Mediterranee (France)
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- *
- */
-
-#ifndef TEST_H_
-#define TEST_H_
-
-#include <list>
-#include <string>
-#include <vector>
-#include <sstream>
-#include <iostream>
-
-
-#define TEST(a) std::cout << "TEST: " << (a) << std::endl
-#define TESTMSG(a, b) std::cout << "TEST: " << a << b << std::endl
-#define TESTVALUE(a) std::cout << "TEST: " << #a << ": " << a << std::endl
-
-/**
- * Class to perform test
- */
-
-class Test {
- private:
- std::string name;
- bool (*test)();
-
- std::string separation() const {
- return "+++++++++++++++++++++++++++++++++++++++++++++++++\n";
- }
-
- std::string print_between_plus(std::string& s) const {
- std::stringstream res;
- res << "+++++++++++++++++" << s << "+++++++++++++++++\n";
- return res.str();
- }
-
- public:
- Test(std::string name_, bool (*test_)()) {
- name = name_;
- test = test_;
- }
-
- bool run() {
- std::cout << print_between_plus(name);
- return test();
- }
-
- std::string getName() {
- return name;
- }
-};
-
-class Tests {
- private:
- std::list<Test> tests;
-
- public:
- void add(std::string name_, bool (*test_)()) {
- Test test(name_, test_);
- tests.push_back(test);
- }
-
- bool run() {
- bool tests_succesful(true);
- std::vector<bool> res;
- for (Test test : tests) {
- res.push_back(test.run());
- }
- std::cout << "\n\n results of tests : " << std::endl;
- int i = 0;
- for (Test t : tests) {
- std::cout << "Test " << i << " \"" << t.getName() << "\" --> ";
- if (res[i++]) {
- std::cout << "OK" << std::endl;
- } else {
- std::cout << "Fail" << std::endl;
- tests_succesful = false;
- break;
- }
- }
- return tests_succesful;
- }
-};
-
-#endif // TEST_H_