From ea59541a6e1387ecbe0ada25ee28f764ee5b5b46 Mon Sep 17 00:00:00 2001 From: ageay Date: Fri, 8 Oct 2010 14:32:52 +0000 Subject: [PATCH] *** empty log message *** --- src/MEDCoupling/Test/MEDCouplingBasicsTest.hxx | 2 ++ src/MEDCoupling/Test/MEDCouplingBasicsTest2.cxx | 17 +++++++++++++++++ 2 files changed, 19 insertions(+) diff --git a/src/MEDCoupling/Test/MEDCouplingBasicsTest.hxx b/src/MEDCoupling/Test/MEDCouplingBasicsTest.hxx index ad916caa0..9bbdb8519 100644 --- a/src/MEDCoupling/Test/MEDCouplingBasicsTest.hxx +++ b/src/MEDCoupling/Test/MEDCouplingBasicsTest.hxx @@ -123,6 +123,7 @@ namespace ParaMEDMEM CPPUNIT_TEST( testChangeNbOfComponents ); CPPUNIT_TEST( testSortPerTuple1 ); CPPUNIT_TEST( testIsEqualWithoutConsideringStr1 ); + CPPUNIT_TEST( testGetNodeIdsOfCell1 ); //MEDCouplingBasicsTestInterp.cxx CPPUNIT_TEST( test2DInterpP0P0_1 ); CPPUNIT_TEST( test2DInterpP0P0PL_1 ); @@ -274,6 +275,7 @@ namespace ParaMEDMEM void testChangeNbOfComponents(); void testSortPerTuple1(); void testIsEqualWithoutConsideringStr1(); + void testGetNodeIdsOfCell1(); //MEDCouplingBasicsTestInterp.cxx void test2DInterpP0P0_1(); void test2DInterpP0P0PL_1(); diff --git a/src/MEDCoupling/Test/MEDCouplingBasicsTest2.cxx b/src/MEDCoupling/Test/MEDCouplingBasicsTest2.cxx index a36e06349..acf8efe7d 100644 --- a/src/MEDCoupling/Test/MEDCouplingBasicsTest2.cxx +++ b/src/MEDCoupling/Test/MEDCouplingBasicsTest2.cxx @@ -1960,3 +1960,20 @@ void MEDCouplingBasicsTest::testIsEqualWithoutConsideringStr1() mesh1->decrRef(); mesh2->decrRef(); } + +void MEDCouplingBasicsTest::testGetNodeIdsOfCell1() +{ + MEDCouplingUMesh *mesh1=build2DTargetMesh_1(); + std::vector nodeIds; + mesh1->getNodeIdsOfCell(1,nodeIds); + CPPUNIT_ASSERT_EQUAL(3,(int)nodeIds.size()); + CPPUNIT_ASSERT_EQUAL(1,nodeIds[0]); + CPPUNIT_ASSERT_EQUAL(4,nodeIds[1]); + CPPUNIT_ASSERT_EQUAL(2,nodeIds[2]); + std::vector coords; + mesh1->getCoordinatesOfNode(4,coords); + CPPUNIT_ASSERT_EQUAL(2,(int)coords.size()); + CPPUNIT_ASSERT_DOUBLES_EQUAL(0.2,coords[0],1e-13); + CPPUNIT_ASSERT_DOUBLES_EQUAL(0.2,coords[1],1e-13); + mesh1->decrRef(); +} -- 2.39.2