From 6c13d500db4bf6abcfb085bb57b0f8a77576f849 Mon Sep 17 00:00:00 2001
From: Matthieu Schaller <schaller@strw.leidenuniv.nl>
Date: Fri, 13 May 2022 14:10:25 +0200
Subject: [PATCH] Make changes to the comments in testTimeline.c proposed by
 Mladen

---
 tests/testTimeline.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/tests/testTimeline.c b/tests/testTimeline.c
index 921f08b03c..e7f5a8d150 100644
--- a/tests/testTimeline.c
+++ b/tests/testTimeline.c
@@ -52,6 +52,7 @@ void test_get_integer_time_end(timebin_t bin_min, timebin_t bin_max,
 
       /* we can't have more than this many steps of this size */
       max_step = max_nr_timesteps_test / dti;
+
       if (max_step == 0)
         error("max step == 0? bin %d max_nr_steps %lld", bin,
               max_nr_timesteps_test);
@@ -231,10 +232,11 @@ void test_get_integer_time_begin(timebin_t bin_min, timebin_t bin_max,
       if (set_time_begin >= max_nr_timesteps_test)
         error("Time begin %lld >= max_nr_timesteps %lld?", set_time_begin,
               max_nr_timesteps);
-      if (set_time_begin < (integertime_t)0) error("Time begin < 0?");
+      if (set_time_begin < (integertime_t)0)
+        error("Time begin < 0? set_time_begin=%lld", set_time_begin);
 
-      /* Now mimick a "current time" by removing a fraction of dti from
-       * the step, and see whether we recover the correct time_end */
+      /* Now mimick a "current time" by adding a fraction to dti from
+       * the step, and see whether we recover the correct time_begin */
       displacement = (integertime_t)(random_uniform(0., 1.) * dti);
       ti_current = set_time_begin + displacement;
 
-- 
GitLab