From 0ac817abddffcc042d9fbfc7b2490f15e65b00fc Mon Sep 17 00:00:00 2001
From: Matthieu Schaller <schaller@strw.leidenuniv.nl>
Date: Wed, 24 Oct 2018 16:03:38 +0200
Subject: [PATCH] Also adapt the unit tests to the new i/o function signatures.

---
 tests/testReading.c      | 6 ++----
 tests/testSelectOutput.c | 6 +++---
 2 files changed, 5 insertions(+), 7 deletions(-)

diff --git a/tests/testReading.c b/tests/testReading.c
index 5e6cee7f1e..6e21ec7ff0 100644
--- a/tests/testReading.c
+++ b/tests/testReading.c
@@ -26,7 +26,6 @@
 int main(int argc, char *argv[]) {
 
   size_t Ngas = 0, Ngpart = 0, Nspart = 0;
-  int periodic = -1;
   int flag_entropy_ICs = -1;
   int i, j, k;
   double dim[3];
@@ -48,8 +47,8 @@ int main(int argc, char *argv[]) {
 
   /* Read data */
   read_ic_single("input.hdf5", &us, dim, &parts, &gparts, &sparts, &Ngas,
-                 &Ngpart, &Nspart, &periodic, &flag_entropy_ICs, 1, 1, 0, 0, 0,
-                 1., 1., 1, 0);
+                 &Ngpart, &Nspart, &flag_entropy_ICs, 1, 1, 0, 0, 0, 1., 1., 1,
+                 0);
 
   /* Check global properties read are correct */
   assert(dim[0] == boxSize);
@@ -57,7 +56,6 @@ int main(int argc, char *argv[]) {
   assert(dim[2] == boxSize);
   assert(Ngas == L * L * L);
   assert(Ngpart == L * L * L);
-  assert(periodic == 1);
 
   /* Check particles */
   for (size_t n = 0; n < Ngas; ++n) {
diff --git a/tests/testSelectOutput.c b/tests/testSelectOutput.c
index 7a02b7fb7e..01c80ce8f1 100644
--- a/tests/testSelectOutput.c
+++ b/tests/testSelectOutput.c
@@ -85,8 +85,8 @@ int main(int argc, char *argv[]) {
 
   char *base_name = "testSelectOutput";
   size_t Ngas = 0, Ngpart = 0, Nspart = 0;
-  int periodic = -1;
   int flag_entropy_ICs = -1;
+  int periodic = 1;
   double dim[3];
   struct part *parts = NULL;
   struct gpart *gparts = NULL;
@@ -111,8 +111,8 @@ int main(int argc, char *argv[]) {
   /* Read data */
   message("Reading initial conditions.");
   read_ic_single("input.hdf5", &us, dim, &parts, &gparts, &sparts, &Ngas,
-                 &Ngpart, &Nspart, &periodic, &flag_entropy_ICs, 1, 0, 0, 0, 0,
-                 1., 1., 1, 0);
+                 &Ngpart, &Nspart, &flag_entropy_ICs, 1, 0, 0, 0, 0, 1., 1., 1,
+                 0);
 
   /* pseudo initialization of the space */
   message("Initialization of the space.");
-- 
GitLab