]> SALOME platform Git repositories - tools/medcoupling.git/commitdiff
Salome HOME
*** empty log message ***
authorcvw <cvw>
Tue, 14 Feb 2012 09:05:24 +0000 (09:05 +0000)
committercvw <cvw>
Tue, 14 Feb 2012 09:05:24 +0000 (09:05 +0000)
src/MEDCoupling/Test/MEDCouplingBasicsTest1.cxx
src/MEDCoupling_Swig/MEDCouplingBasicsTest.py

index 455c89c19ef5315002505dad04dd72a8ddfc698d..88451825dfd9713b3de98697fec662403ae0325a 100644 (file)
@@ -2278,9 +2278,9 @@ void MEDCouplingBasicsTest1::testCMesh0()
   const double *val=fieldOnNodes->getArray()->getConstPointer();
   for(int i=0;i<64;i++)
     CPPUNIT_ASSERT_DOUBLES_EQUAL(expected1[i],val[i],1e-12);
-  double res;
-  fieldOnNodes->getValueOnPos(1,3,2,&res);
-  CPPUNIT_ASSERT_DOUBLES_EQUAL(7.,res,1e-12);
+  double res[1];  //size fieldOnNodes->getNumberOfComponents()
+  fieldOnNodes->getValueOnPos(1,3,2,&res[0]);
+  CPPUNIT_ASSERT_DOUBLES_EQUAL(7.,res[0],1e-12);
   fieldOnNodes->decrRef();
   //
   MEDCouplingFieldDouble *fieldOnCells=mesh->fillFromAnalytic(ON_CELLS,1,"x+y/2.+z/3.");
@@ -2291,8 +2291,8 @@ void MEDCouplingBasicsTest1::testCMesh0()
                               6, 4.5, 6, 7.5, 3, 4.5, 6, 4.5, 6, 7.5, 6, 7.5, 9};
   for(int i=0;i<27;i++)
     CPPUNIT_ASSERT_DOUBLES_EQUAL(expected2[i],val[i],1e-12);
-  fieldOnCells->getValueOnPos(1,2,1,&res);
-  CPPUNIT_ASSERT_DOUBLES_EQUAL(6.,res,1e-12);
+  fieldOnCells->getValueOnPos(1,2,1,&res[0]);
+  CPPUNIT_ASSERT_DOUBLES_EQUAL(6.,res[0],1e-12);
   fieldOnCells->decrRef();
   //
   MEDCouplingMesh* meshDeepCopy=mesh->deepCpy();
index f165e362866d47d924784f575d59aab3be83e127..1e49843f536a74d08aeab4109e8c98b65513c13f 100644 (file)
@@ -1865,21 +1865,6 @@ class MEDCouplingBasicsTest(unittest.TestCase):
         mesh2d.setCoords(coordsX1, coordsY1);
         f1=mesh2d.buildOrthogonalField();
         
-        """Serialization tested with corba
-        tinyInfoD, tinyInfo, littleStrings=mesh2d.getTinySerializationInformation();
-        self.assertEqual(5,len(tinyInfo));
-        self.assertEqual(4,tinyInfo[0]);   #x
-        self.assertEqual(4,tinyInfo[1]);   #y
-        self.assertEqual(-1,tinyInfo[2]);  #z
-        self.assertEqual(-1,tinyInfo[3]);  #it
-        self.assertEqual(-1,tinyInfo[4]);   #order
-        self.assertAlmostEqual(0.,tinyInfoD[0],14); #time
-        d1=DataArrayInt.New();
-        d2=DataArrayDouble.New();
-        mesh2d.resizeForUnserialization(tinyInfo, d1, d2, littleStrings);
-        self.assertEqual(0,d1.getNumberOfTuples());
-        self.assertEqual(8,d2.getNumberOfTuples());
-        """
         pass
 
     def testScale(self):