summaryrefslogtreecommitdiff
path: root/src/tests/tng_io_testing.c
diff options
context:
space:
mode:
authorMagnus Lundborg <lundborg.magnus@gmail.com>2014-10-03 09:51:30 (GMT)
committerMagnus Lundborg <magnus.lundborg@scilifelab.se>2014-10-03 10:16:06 (GMT)
commitfe0628c358e7129df7e7d70ba300913ea46a66d9 (patch)
tree3fc5d04c40e4525dc3077fcbf575c8ec9569398d /src/tests/tng_io_testing.c
parent966d231329920cc82ccb5cc1cbeeba0a7daaf1b2 (diff)
More detailed output when some tests fail.
Change-Id: I749db2adcfef0fd79d39beeab700310856f33563
Diffstat (limited to 'src/tests/tng_io_testing.c')
-rw-r--r--src/tests/tng_io_testing.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/tests/tng_io_testing.c b/src/tests/tng_io_testing.c
index c606217..3d790f4 100644
--- a/src/tests/tng_io_testing.c
+++ b/src/tests/tng_io_testing.c
@@ -833,6 +833,7 @@ static tng_function_status tng_test_write_and_read_traj(tng_trajectory_t *traj,
{
printf("Time per frame does not match when reading written file. %s: %d\n",
__FILE__, __LINE__);
+ printf("Value: %e, expected value: %e\n", temp_double, TIME_PER_FRAME);
return(TNG_FAILURE);
}
@@ -1049,11 +1050,15 @@ tng_function_status tng_test_utility_functions(tng_trajectory_t traj, const char
stat = tng_util_time_of_frame_get(traj, 50, &time);
if(stat != TNG_SUCCESS || fabs(time - 100e-13) > 0.000001)
{
+ printf("Unexpected time at frame 50. %s: %d\n", __FILE__, __LINE__);
+ printf("Value: %e, expected value: %e\n", time, 100e-13);
return(stat);
}
stat = tng_util_time_of_frame_get(traj, 100, &time);
if(stat != TNG_SUCCESS || fabs(time - 200e-13) > 0.000001)
{
+ printf("Unexpected time at frame 100. %s: %d\n", __FILE__, __LINE__);
+ printf("Value: %e, expected value: %e\n", time, 100e-13);
return(stat);
}
@@ -1062,6 +1067,10 @@ tng_function_status tng_test_utility_functions(tng_trajectory_t traj, const char
stat = tng_util_num_frames_with_data_of_block_id_get(traj, TNG_TRAJ_POSITIONS, &n_frames);
if(stat != TNG_SUCCESS || n_frames != n_frames_per_frame_set * N_FRAME_SETS)
{
+ printf("Unexpected number of frames with positions data. %s: %d\n",
+ __FILE__, __LINE__);
+ printf("Value: %"PRId64", expected value: %"PRId64"\n", n_frames,
+ n_frames_per_frame_set * N_FRAME_SETS);
return(stat);
}
contact: Jan Huwald // Impressum