Salome HOME
Merge branch 'master' of https://git.salome-platform.org/git/tools/medcoupling
[tools/medcoupling.git] / src / MEDCoupling / Test / MEDCouplingBasicsTest4.cxx
index 9e88f8e275a1ef9dae42c98e9fe5a27998399a47..b9c49c424a5c3d7f73cf46db5c3d96d785e97c68 100644 (file)
@@ -1,9 +1,9 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D
+// Copyright (C) 2007-2015  CEA/DEN, EDF R&D
 //
 // This library is free software; you can redistribute it and/or
 // modify it under the terms of the GNU Lesser General Public
 // License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -178,9 +178,8 @@ void MEDCouplingBasicsTest4::testDAICheckAndPreparePermutation1()
   da->alloc(8,1);
   da->iota(0);
   da2=da->checkAndPreparePermutation();
-  CPPUNIT_ASSERT_EQUAL(8,da2->getNumberOfTuples());
   CPPUNIT_ASSERT_EQUAL(1,da2->getNumberOfComponents());
-  CPPUNIT_ASSERT(da2->isIdentity());
+  CPPUNIT_ASSERT(da2->isIdentity2(8));
   da2->decrRef();
   da->decrRef();
   //
@@ -238,8 +237,7 @@ void MEDCouplingBasicsTest4::testUMeshFindCellIdsOnBoundary1()
 {
   MEDCouplingUMesh *m=build3DSurfTargetMesh_1();
   DataArrayInt *da5=m->findCellIdsOnBoundary();
-  CPPUNIT_ASSERT_EQUAL(5,da5->getNumberOfTuples());
-  CPPUNIT_ASSERT(da5->isIdentity());
+  CPPUNIT_ASSERT(da5->isIdentity2(5));
   //
   da5->decrRef();
   m->decrRef();
@@ -1714,7 +1712,7 @@ void MEDCouplingBasicsTest4::testUMeshMergeMeshesCVW1()
   MEDCouplingUMesh *m=build3DSurfTargetMesh_1();
   MEDCouplingUMesh *m2=MEDCouplingUMesh::New("toto",2);
   MEDCouplingUMesh *m3=MEDCouplingUMesh::MergeUMeshes(m,m2);
-  m3->setName(m->getName());
+  m3->setName(m->getName().c_str());
   CPPUNIT_ASSERT(m->isEqual(m3,1e-12));
   m3->decrRef();
   m->decrRef();
@@ -1833,7 +1831,7 @@ void MEDCouplingBasicsTest4::testDADFindCommonTuples1()
   CPPUNIT_ASSERT_EQUAL((std::size_t)1,cI->getNbOfElems());
   CPPUNIT_ASSERT_EQUAL(0,cI->getIJ(0,0));
   
-  da->alloc(6,4);  //bad NumberOfComponents
+  da->alloc(6,5);  //bad NumberOfComponents
   CPPUNIT_ASSERT_THROW(da->findCommonTuples(1e-2,-1,c,cI),INTERP_KERNEL::Exception);
   
   c->decrRef();