[cig-commits] r21667 - short/3D/PyLith/trunk/unittests/libtests/topology

brad at geodynamics.org brad at geodynamics.org
Wed Mar 27 15:41:46 PDT 2013


Author: brad
Date: 2013-03-27 15:41:46 -0700 (Wed, 27 Mar 2013)
New Revision: 21667

Modified:
   short/3D/PyLith/trunk/unittests/libtests/topology/TestMesh.cc
   short/3D/PyLith/trunk/unittests/libtests/topology/TestSubMesh.cc
Log:
Fixed comparison (need to cast MPI compare enum to int).

Modified: short/3D/PyLith/trunk/unittests/libtests/topology/TestMesh.cc
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/topology/TestMesh.cc	2013-03-27 22:38:12 UTC (rev 21666)
+++ short/3D/PyLith/trunk/unittests/libtests/topology/TestMesh.cc	2013-03-27 22:41:46 UTC (rev 21667)
@@ -43,19 +43,19 @@
   CPPUNIT_ASSERT_EQUAL(0, mesh.dimension());
   CPPUNIT_ASSERT_EQUAL(false, mesh.debug());
   MPI_Comm_compare(PETSC_COMM_WORLD, mesh.comm(), &result);
-  CPPUNIT_ASSERT_EQUAL(MPI_IDENT, result);
+  CPPUNIT_ASSERT_EQUAL(int(MPI_IDENT), result);
   
   Mesh mesh2(2);
   CPPUNIT_ASSERT(!mesh2._mesh.isNull());
   CPPUNIT_ASSERT_EQUAL(2, mesh2.dimension());
   MPI_Comm_compare(PETSC_COMM_WORLD, mesh2.comm(), &result);
-  CPPUNIT_ASSERT_EQUAL(MPI_IDENT, result);
+  CPPUNIT_ASSERT_EQUAL(int(MPI_IDENT), result);
 
   Mesh mesh3(1, PETSC_COMM_SELF);
   CPPUNIT_ASSERT(!mesh3._mesh.isNull());
   CPPUNIT_ASSERT_EQUAL(1, mesh3.dimension());
   MPI_Comm_compare(PETSC_COMM_WORLD, mesh3.comm(), &result);
-  CPPUNIT_ASSERT_EQUAL(MPI_CONGRUENT, result);
+  CPPUNIT_ASSERT_EQUAL(int(MPI_CONGRUENT), result);
 } // testConstructor
 
 // ----------------------------------------------------------------------

Modified: short/3D/PyLith/trunk/unittests/libtests/topology/TestSubMesh.cc
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/topology/TestSubMesh.cc	2013-03-27 22:38:12 UTC (rev 21666)
+++ short/3D/PyLith/trunk/unittests/libtests/topology/TestSubMesh.cc	2013-03-27 22:41:46 UTC (rev 21667)
@@ -87,7 +87,7 @@
 
   int result = 0;
   MPI_Comm_compare(PETSC_COMM_WORLD, mesh.comm(), &result);
-  CPPUNIT_ASSERT_EQUAL(MPI_CONGRUENT, result);
+  CPPUNIT_ASSERT_EQUAL(int(MPI_CONGRUENT), result);
 
   // Check vertices
   const PetscDM dmMesh = mesh.dmMesh();CPPUNIT_ASSERT(dmMesh);
@@ -127,7 +127,7 @@
 
   int result = 0;
   MPI_Comm_compare(PETSC_COMM_WORLD, mesh.comm(), &result);
-  CPPUNIT_ASSERT_EQUAL(MPI_CONGRUENT, result);
+  CPPUNIT_ASSERT_EQUAL(int(MPI_CONGRUENT), result);
 
   // Check vertices
   const PetscDM dmMesh = mesh.dmMesh();CPPUNIT_ASSERT(dmMesh);
@@ -205,7 +205,7 @@
 
   int result = 0;
   MPI_Comm_compare(PETSC_COMM_WORLD, mesh.comm(), &result);
-  CPPUNIT_ASSERT_EQUAL(MPI_CONGRUENT, result);
+  CPPUNIT_ASSERT_EQUAL(int(MPI_CONGRUENT), result);
 } // testComm
 
 // ----------------------------------------------------------------------



More information about the CIG-COMMITS mailing list