From: ageay Date: Thu, 14 Jun 2012 13:54:10 +0000 (+0000) Subject: modification of API of MEDCouplingPointSet::findBoundaryNodes X-Git-Tag: V6_main_FINAL~648 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=c966805cff9630852b6a7f3fbd7ca0d2763859dc;p=tools%2Fmedcoupling.git modification of API of MEDCouplingPointSet::findBoundaryNodes --- diff --git a/src/MEDCoupling/Test/MEDCouplingBasicsTest1.cxx b/src/MEDCoupling/Test/MEDCouplingBasicsTest1.cxx index ba6ae4027..12769a45c 100644 --- a/src/MEDCoupling/Test/MEDCouplingBasicsTest1.cxx +++ b/src/MEDCoupling/Test/MEDCouplingBasicsTest1.cxx @@ -545,11 +545,12 @@ void MEDCouplingBasicsTest1::testDescConn3D() void MEDCouplingBasicsTest1::testFindBoundaryNodes() { MEDCouplingUMesh *mesh=build3DTargetMesh_1(); - std::vector boundaryNodes; - mesh->findBoundaryNodes(boundaryNodes); - CPPUNIT_ASSERT_EQUAL(26,(int)boundaryNodes.size()); + DataArrayInt *boundaryNodes=mesh->findBoundaryNodes(); + CPPUNIT_ASSERT_EQUAL(26,boundaryNodes->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(1,boundaryNodes->getNumberOfComponents()); const int expected1[26]={0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26}; - CPPUNIT_ASSERT(std::equal(expected1,expected1+26,boundaryNodes.begin())); + CPPUNIT_ASSERT(std::equal(expected1,expected1+26,boundaryNodes->begin())); + boundaryNodes->decrRef(); mesh->decrRef(); } diff --git a/src/MEDCoupling/Test/MEDCouplingBasicsTest3.cxx b/src/MEDCoupling/Test/MEDCouplingBasicsTest3.cxx index c5cb30967..a9d8b8759 100644 --- a/src/MEDCoupling/Test/MEDCouplingBasicsTest3.cxx +++ b/src/MEDCoupling/Test/MEDCouplingBasicsTest3.cxx @@ -1046,7 +1046,7 @@ void MEDCouplingBasicsTest3::testDAIGetIdsEqualList1() std::copy(tab1,tab1+7,da->getPointer()); const int tab2[3]={3,-2,0}; std::vector tab2V(tab2,tab2+3); - DataArrayInt *da2=da->getIdsEqualList(tab2V); + DataArrayInt *da2=da->getIdsEqualList(&tab2V[0],&tab2V[0]+tab2V.size()); CPPUNIT_ASSERT_EQUAL(4,da2->getNumberOfTuples()); CPPUNIT_ASSERT_EQUAL(1,da2->getNumberOfComponents()); const int expected1[4]={1,3,4,6}; diff --git a/src/MEDCoupling/Test/MEDCouplingBasicsTest4.cxx b/src/MEDCoupling/Test/MEDCouplingBasicsTest4.cxx index d412fde11..be97db389 100644 --- a/src/MEDCoupling/Test/MEDCouplingBasicsTest4.cxx +++ b/src/MEDCoupling/Test/MEDCouplingBasicsTest4.cxx @@ -779,7 +779,7 @@ void MEDCouplingBasicsTest4::testDAIGetIdsNotEqual1() const int vals2[3]={-4,5,6}; std::vector vals3(vals2,vals2+3); d->rearrange(1); - DataArrayInt *d3=d->getIdsNotEqualList(vals3); + DataArrayInt *d3=d->getIdsNotEqualList(&vals3[0],&vals3[0]+vals3.size()); CPPUNIT_ASSERT_EQUAL(5,d3->getNumberOfTuples()); CPPUNIT_ASSERT_EQUAL(1,d3->getNumberOfComponents()); const int expected2[5]={0,1,4,8,9};