Make PBC type enumeration into PbcType enum class
[alexxy/gromacs.git] / src / gromacs / trajectoryanalysis / tests / topologyinformation.cpp
index 7124600ac93fce4b5bd1f3dea512ca1ccd88d147..4728ed6d9652557b3f19c706c621f1bf41a452af 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * This file is part of the GROMACS molecular simulation package.
  *
- * Copyright (c) 2018,2019, by the GROMACS development team, led by
+ * Copyright (c) 2018,2019,2020, 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.
@@ -47,6 +47,7 @@
 
 #include "gromacs/gmxpreprocess/grompp.h"
 #include "gromacs/math/vectypes.h"
+#include "gromacs/pbcutil/pbc.h"
 #include "gromacs/topology/topology.h"
 #include "gromacs/utility/arrayref.h"
 #include "gromacs/utility/exceptions.h"
@@ -77,7 +78,7 @@ TEST(TopologyInformation, CantWorkWithoutReadingAFile)
     ASSERT_TRUE(atoms2);
     EXPECT_NE(atoms1.get(), atoms2.get());
     EXPECT_EQ(0, atoms1->nr);
-    EXPECT_EQ(-1, topInfo.ePBC());
+    EXPECT_EQ(PbcType::Unset, topInfo.pbcType());
     EXPECT_THROW(topInfo.x().size(), gmx::APIError);
     EXPECT_THROW(topInfo.v().size(), gmx::APIError);
     matrix box{ { -2 } };
@@ -135,7 +136,7 @@ TEST(TopologyInformation, WorksWithGroFile)
     topInfo.fillFromInputFile(TestFileManager::getInputFilePath("lysozyme.gro"));
     EXPECT_FALSE(topInfo.hasFullTopology());
     runCommonTests(topInfo, numAtoms);
-    EXPECT_EQ(-1, topInfo.ePBC());
+    EXPECT_EQ(PbcType::Unset, topInfo.pbcType());
 
     // Check the per-atom data
     auto atoms = topInfo.copyAtoms();
@@ -168,7 +169,7 @@ TEST(TopologyInformation, WorksWithPdbFile)
     EXPECT_FALSE(topInfo.hasFullTopology());
     runCommonTests(topInfo, numAtoms);
     // TODO why does this differ from .gro?
-    EXPECT_EQ(0, topInfo.ePBC());
+    EXPECT_EQ(PbcType::Xyz, topInfo.pbcType());
 
     // Check the per-atom data
     auto atoms = topInfo.copyAtoms();
@@ -220,7 +221,7 @@ TEST(TopologyInformation, WorksWithTprFromPdbFile)
     EXPECT_TRUE(topInfo.hasFullTopology());
     runCommonTests(topInfo, numAtoms);
     // TODO why does this differ from .gro?
-    EXPECT_EQ(0, topInfo.ePBC());
+    EXPECT_EQ(PbcType::Xyz, topInfo.pbcType());
 
     // Check the per-atom data
     auto atoms = topInfo.copyAtoms();