X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FMEDCoupling%2FTest%2FMEDCouplingBasicsTest2.cxx;h=d1482a26835aba6e2244f2ef1df8cf2112cdae4c;hb=584bab5f7596b65a3a87a34b63e54d2bd1ff8894;hp=4be6abb37ba5d8c850c2f15b10ead57e0630e3ef;hpb=f1a947b32a36d8dc8e3079b25305bb50e8cb59a0;p=tools%2Fmedcoupling.git diff --git a/src/MEDCoupling/Test/MEDCouplingBasicsTest2.cxx b/src/MEDCoupling/Test/MEDCouplingBasicsTest2.cxx index 4be6abb37..d1482a268 100644 --- a/src/MEDCoupling/Test/MEDCouplingBasicsTest2.cxx +++ b/src/MEDCoupling/Test/MEDCouplingBasicsTest2.cxx @@ -1816,6 +1816,18 @@ void MEDCouplingBasicsTest2::testMaxPerTuple1() CPPUNIT_ASSERT_DOUBLES_EQUAL(5.6,f2->getIJ(i,0),1e-13); f2->decrRef(); // + DataArrayInt *d2I=0; + DataArrayDouble *d2=array->maxPerTupleWithCompoId(d2I); + CPPUNIT_ASSERT_EQUAL(1,d2->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(5,d2->getNumberOfTuples()); + const int expected2[5]={4,3,2,0,1}; + for(int i=0;i<5;i++) + { + CPPUNIT_ASSERT_DOUBLES_EQUAL(5.6,d2->getIJ(i,0),1e-13); + CPPUNIT_ASSERT_EQUAL(expected2[i],d2I->getIJ(i,0)); + } + d2->decrRef(); d2I->decrRef(); + // mesh1->decrRef(); f1->decrRef(); }