From 72d14f37942fe3c44bb7e1ea2acfe09197a44212 Mon Sep 17 00:00:00 2001 From: Elias Pipping <elias.pipping@fu-berlin.de> Date: Mon, 19 Sep 2011 15:40:37 +0200 Subject: [PATCH] Test starting at 0. --- src/test-gradient-method.cc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/test-gradient-method.cc b/src/test-gradient-method.cc index d65bde2f..72c243d4 100644 --- a/src/test-gradient-method.cc +++ b/src/test-gradient-method.cc @@ -67,6 +67,12 @@ void testSampleFunction() { double const ret2 = functionTester(J, start, 10); assert(std::abs(ret1 - ret2) < 1e-5); + + start[0] = 0; + start[1] = 0; + + double const ret3 = functionTester(J, start, 3); + assert(std::abs(ret1 - ret3) < 1e-5); } void testSampleFunctionNonsmooth() { -- GitLab