summaryrefslogtreecommitdiff
path: root/src/tests/tng_io_testing.c
diff options
context:
space:
mode:
authorMagnus Lundborg <magnus.lundborg@scilifelab.se>2012-12-04 09:31:55 (GMT)
committerMagnus Lundborg <magnus.lundborg@scilifelab.se>2012-12-04 09:31:55 (GMT)
commit59e55a7659dc7c4df7a55b1e154b1fdf8d0891bc (patch)
tree56f4df5398070d5755ab86cd447354f75aa95e43 /src/tests/tng_io_testing.c
parent49729d76585e0b97167aa487b5eafafc08bbf6a5 (diff)
Use flag to choose whether to generate hash or not.
Diffstat (limited to 'src/tests/tng_io_testing.c')
-rw-r--r--src/tests/tng_io_testing.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/tests/tng_io_testing.c b/src/tests/tng_io_testing.c
index c9f7e5d..14114f8 100644
--- a/src/tests/tng_io_testing.c
+++ b/src/tests/tng_io_testing.c
@@ -99,12 +99,12 @@ static tng_function_status tng_test_read_and_write_file
{
tng_function_status stat;
- stat = tng_read_file_headers(traj, TNG_KEEP_FILE_OPEN);
+ stat = tng_read_file_headers(traj, TNG_KEEP_FILE_OPEN, TNG_USE_HASH);
if(stat == TNG_CRITICAL)
{
return(stat);
}
- stat = tng_write_file_headers(traj, TNG_KEEP_FILE_OPEN);
+ stat = tng_write_file_headers(traj, TNG_KEEP_FILE_OPEN, TNG_USE_HASH);
if(stat == TNG_CRITICAL)
{
return(stat);
@@ -113,12 +113,12 @@ static tng_function_status tng_test_read_and_write_file
while(stat != TNG_CRITICAL && traj->input_file_pos < traj->input_file_len &&
traj->current_trajectory_frame_set.next_frame_set_file_pos != -1UL)
{
- stat = tng_read_next_frame_set(traj, TNG_KEEP_FILE_OPEN);
+ stat = tng_read_next_frame_set(traj, TNG_KEEP_FILE_OPEN, TNG_USE_HASH);
if(stat == TNG_CRITICAL)
{
return(stat);
}
- stat = tng_write_frame_set(traj, TNG_KEEP_FILE_OPEN);
+ stat = tng_write_frame_set(traj, TNG_KEEP_FILE_OPEN, TNG_USE_HASH);
}
return(stat);
@@ -148,7 +148,7 @@ static tng_function_status tng_test_write_and_read_traj(tng_trajectory_t traj)
return(TNG_CRITICAL);
}
- if(tng_write_file_headers(traj, TNG_KEEP_FILE_OPEN) == TNG_CRITICAL)
+ if(tng_write_file_headers(traj, TNG_KEEP_FILE_OPEN, TNG_SKIP_HASH) == TNG_CRITICAL)
{
return(TNG_CRITICAL);
}
@@ -227,7 +227,7 @@ static tng_function_status tng_test_write_and_read_traj(tng_trajectory_t traj)
free(data);
return(TNG_CRITICAL);
}
- if(tng_write_frame_set(traj, TNG_KEEP_FILE_OPEN) != TNG_SUCCESS)
+ if(tng_write_frame_set(traj, TNG_KEEP_FILE_OPEN, TNG_SKIP_HASH) != TNG_SUCCESS)
{
printf("Error writing frame set. %s: %d\n", __FILE__, __LINE__);
free(molpos);
@@ -248,12 +248,12 @@ static tng_function_status tng_test_write_and_read_traj(tng_trajectory_t traj)
tng_destroy_trajectory(traj);
tng_set_input_file(traj, "/tmp/tng_test.tng");
- stat = tng_read_file_headers(traj, TNG_KEEP_FILE_OPEN);
+ stat = tng_read_file_headers(traj, TNG_KEEP_FILE_OPEN, TNG_SKIP_HASH);
while(stat != TNG_CRITICAL && traj->input_file_pos < traj->input_file_len &&
traj->current_trajectory_frame_set.next_frame_set_file_pos != -1ULL)
{
- stat = tng_read_next_frame_set(traj, TNG_KEEP_FILE_OPEN);
+ stat = tng_read_next_frame_set(traj, TNG_KEEP_FILE_OPEN, TNG_SKIP_HASH);
if(stat == TNG_CRITICAL)
{
return(stat);
contact: Jan Huwald // Impressum