Use cmakedefine01 for more trivial defines
[alexxy/gromacs.git] / src / programs / mdrun / tests / rerun.cpp
index 8ba5d6b559fbc47cd72165e797abaa995a28b4ac..e19e7497a4db5d537cac0975451d3ca633070723 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * This file is part of the GROMACS molecular simulation package.
  *
- * Copyright (c) 2013,2014, by the GROMACS development team, led by
+ * Copyright (c) 2013,2014,2015, by the GROMACS development team, led by
  * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
  * and including many others, as listed in the AUTHORS file in the
  * top-level source directory and at http://www.gromacs.org.
  * Tests for the mdrun -rerun functionality
  *
  * \author Mark Abraham <mark.j.abraham@gmail.com>
- * \ingroup module_mdrun
+ * \ingroup module_mdrun_integration_tests
  */
+#include "gmxpre.h"
+
+#include "config.h"
+
 #include <gtest/gtest.h>
-#include "moduletest.h"
+
 #include "gromacs/options/filenameoption.h"
+
 #include "testutils/cmdlinetest.h"
 
+#include "moduletest.h"
+
 namespace
 {
 
@@ -57,16 +64,16 @@ class MdrunRerun : public gmx::test::MdrunTestFixture,
 /* Among other things, this test ensures mdrun can read a trajectory. */
 TEST_P(MdrunRerun, WithDifferentInputFormats)
 {
-    useEmptyMdpFile();
-    useTopGroAndNdxFromDatabase("spc2");
-    EXPECT_EQ(0, callGrompp());
+    runner_.useEmptyMdpFile();
+    runner_.useTopGroAndNdxFromDatabase("spc2");
+    EXPECT_EQ(0, runner_.callGrompp());
 
     std::string rerunFileName = fileManager_.getInputFilePath(GetParam());
 
     ::gmx::test::CommandLine rerunCaller;
     rerunCaller.append("mdrun");
     rerunCaller.addOption("-rerun", rerunFileName);
-    ASSERT_EQ(0, callMdrun(rerunCaller));
+    ASSERT_EQ(0, runner_.callMdrun(rerunCaller));
 }
 
 /*! \brief Helper array of input files present in the source repo
@@ -75,7 +82,7 @@ TEST_P(MdrunRerun, WithDifferentInputFormats)
  * version. */
 const char *trajectoryFileNames[] = {
     "../../../gromacs/gmxana/legacytests/spc2-traj.trr",
-#ifdef GMX_USE_TNG
+#if defined GMX_USE_TNG && HAVE_ZLIB
     "../../../gromacs/gmxana/legacytests/spc2-traj.tng",
 #endif
     "../../../gromacs/gmxana/legacytests/spc2-traj.xtc",
@@ -92,7 +99,7 @@ const char *trajectoryFileNames[] = {
 
 INSTANTIATE_TEST_CASE_P(NoFatalErrorFrom,
                         MdrunRerun,
-                        ::testing::ValuesIn(gmx::ArrayRef<const char*>(trajectoryFileNames)));
+                            ::testing::ValuesIn(gmx::ArrayRef<const char*>(trajectoryFileNames)));
 
 /*! \todo Add other tests for mdrun -rerun, e.g.
  *