Skip to content
Snippets Groups Projects
Commit 6c13d500 authored by Matthieu Schaller's avatar Matthieu Schaller
Browse files

Make changes to the comments in testTimeline.c proposed by Mladen

parent 03582436
No related branches found
No related tags found
1 merge request!1558Sync mhd canvas before is too late
...@@ -52,6 +52,7 @@ void test_get_integer_time_end(timebin_t bin_min, timebin_t bin_max, ...@@ -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 */ /* we can't have more than this many steps of this size */
max_step = max_nr_timesteps_test / dti; max_step = max_nr_timesteps_test / dti;
if (max_step == 0) if (max_step == 0)
error("max step == 0? bin %d max_nr_steps %lld", bin, error("max step == 0? bin %d max_nr_steps %lld", bin,
max_nr_timesteps_test); max_nr_timesteps_test);
...@@ -231,10 +232,11 @@ void test_get_integer_time_begin(timebin_t bin_min, timebin_t bin_max, ...@@ -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) if (set_time_begin >= max_nr_timesteps_test)
error("Time begin %lld >= max_nr_timesteps %lld?", set_time_begin, error("Time begin %lld >= max_nr_timesteps %lld?", set_time_begin,
max_nr_timesteps); 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 /* Now mimick a "current time" by adding a fraction to dti from
* the step, and see whether we recover the correct time_end */ * the step, and see whether we recover the correct time_begin */
displacement = (integertime_t)(random_uniform(0., 1.) * dti); displacement = (integertime_t)(random_uniform(0., 1.) * dti);
ti_current = set_time_begin + displacement; ti_current = set_time_begin + displacement;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment