From c194c0076c425f1c0e22fce5c92b8f9e1d4f0d4d Mon Sep 17 00:00:00 2001
From: Elias Pipping <elias.pipping@fu-berlin.de>
Date: Tue, 31 Jul 2012 15:09:54 +0200
Subject: [PATCH] Test the 1-circle and the 10-circle

---
 src/Makefile.am    | 8 ++++++--
 src/test-circle.cc | 8 ++++++--
 2 files changed, 12 insertions(+), 4 deletions(-)

diff --git a/src/Makefile.am b/src/Makefile.am
index 334108b1..86c0159d 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -1,5 +1,6 @@
 check_PROGRAMS = \
-	test-circle \
+	test-circle-1 \
+	test-circle-10 \
 	test-gradient-horrible \
 	test-gradient-horrible-logarithmic \
 	test-gradient-identity \
@@ -13,7 +14,10 @@ check_PROGRAMS = \
 	test-gradient-sample2 \
 	test-gradient-trivial
 
-test_circle_SOURCES                        = test-circle.cc
+test_circle_1_SOURCES                      = test-circle.cc
+test_circle_1_CPPFLAGS                     = $(AM_CPPFLAGS) -DDUNE_TECTONIC_TEST_CIRCLE_SCALE=1
+test_circle_10_SOURCES                     = test-circle.cc
+test_circle_10_CPPFLAGS                    = $(AM_CPPFLAGS) -DDUNE_TECTONIC_TEST_CIRCLE_SCALE=10
 test_gradient_horrible_SOURCES             = test-gradient-horrible.cc
 test_gradient_horrible_logarithmic_SOURCES = test-gradient-horrible-logarithmic.cc
 test_gradient_identity_SOURCES             = test-gradient-identity.cc
diff --git a/src/test-circle.cc b/src/test-circle.cc
index 19bbb3f6..2a6e7fc1 100644
--- a/src/test-circle.cc
+++ b/src/test-circle.cc
@@ -1,10 +1,14 @@
 /* Assures that a circle never has more than two minima and that the
-   bisection takes us to one after no more than <iterations> steps */
+   bisection takes us to one in a single step */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
 
+#ifndef DUNE_TECTONIC_TEST_CIRCLE_SCALE
+#error DUNE_TECTONIC_TEST_CIRCLE_SCALE cannot be unset
+#endif
+
 #include <cassert>
 
 #include <boost/format.hpp>
@@ -36,7 +40,7 @@ int main() {
 
   Bisection const bisection(0.0, 1.0, 1e-12, false, 0);
 
-  double scale = 10;
+  double scale = DUNE_TECTONIC_TEST_CIRCLE_SCALE;
 
   std::vector<SmallVector> minima(4);
   std::vector<double> radii = { M_PI / 4.0,     3 * M_PI / 4.0,
-- 
GitLab