]> SALOME platform Git repositories - tools/medcoupling.git/commitdiff
Salome HOME
Bug in swiging.
authorageay <ageay>
Wed, 20 Apr 2011 17:14:33 +0000 (17:14 +0000)
committerageay <ageay>
Wed, 20 Apr 2011 17:14:33 +0000 (17:14 +0000)
src/MEDCoupling_Swig/MEDCoupling.i
src/MEDCoupling_Swig/MEDCouplingBasicsTest.py

index f2d9e495afa25339e34c038d39e7f6a5c087650b..08a975ca1bbf27dd0dbbeb3f3c3c2568b6ee9da9 100644 (file)
@@ -1318,7 +1318,7 @@ namespace ParaMEDMEM
          if(!da2)
            throw INTERP_KERNEL::Exception("Not null DataArrayInt instance expected !");
          da2->checkAllocated();
-         int size=self->getNbOfElems();
+         int size=self->getNumberOfTuples();
          if(size!=self->getNumberOfTuples())
            {
              throw INTERP_KERNEL::Exception("Invalid list length ! Must be equal to number of tuples !");
@@ -1347,7 +1347,7 @@ namespace ParaMEDMEM
          if(!da2)
            throw INTERP_KERNEL::Exception("Not null DataArrayInt instance expected !");
          da2->checkAllocated();
-         int size=self->getNbOfElems();
+         int size=self->getNumberOfTuples();
          if(size!=self->getNumberOfTuples())
            {
              throw INTERP_KERNEL::Exception("Invalid list length ! Must be equal to number of tuples !");
@@ -1376,7 +1376,7 @@ namespace ParaMEDMEM
          if(!da2)
            throw INTERP_KERNEL::Exception("Not null DataArrayInt instance expected !");
          da2->checkAllocated();
-         int size=self->getNbOfElems();
+         int size=self->getNumberOfTuples();
          if(size!=self->getNumberOfTuples())
            {
              throw INTERP_KERNEL::Exception("Invalid list length ! Must be equal to number of tuples !");
@@ -1405,7 +1405,7 @@ namespace ParaMEDMEM
          if(!da2)
            throw INTERP_KERNEL::Exception("Not null DataArrayInt instance expected !");
          da2->checkAllocated();
-         int size=self->getNbOfElems();
+         int size=self->getNumberOfTuples();
          if(size!=self->getNumberOfTuples())
            {
              throw INTERP_KERNEL::Exception("Invalid list length ! Must be equal to number of tuples !");
@@ -1434,7 +1434,7 @@ namespace ParaMEDMEM
          if(!da2)
            throw INTERP_KERNEL::Exception("Not null DataArrayInt instance expected !");
          da2->checkAllocated();
-         int size=self->getNbOfElems();
+         int size=self->getNumberOfTuples();
          if(size!=self->getNumberOfTuples())
            {
              throw INTERP_KERNEL::Exception("Invalid list length ! Must be equal to number of tuples !");
@@ -2419,7 +2419,7 @@ namespace ParaMEDMEM
          if(!da2)
            throw INTERP_KERNEL::Exception("Not null DataArrayInt instance expected !");
          da2->checkAllocated();
-         int size=self->getNbOfElems();
+         int size=self->getNumberOfTuples();
          if(size!=self->getNumberOfTuples())
            {
              throw INTERP_KERNEL::Exception("Invalid list length ! Must be equal to number of tuples !");
@@ -2448,7 +2448,7 @@ namespace ParaMEDMEM
          if(!da2)
            throw INTERP_KERNEL::Exception("Not null DataArrayInt instance expected !");
          da2->checkAllocated();
-         int size=self->getNbOfElems();
+         int size=self->getNumberOfTuples();
          if(size!=self->getNumberOfTuples())
            {
              throw INTERP_KERNEL::Exception("Invalid list length ! Must be equal to number of tuples !");
@@ -2477,7 +2477,7 @@ namespace ParaMEDMEM
          if(!da2)
            throw INTERP_KERNEL::Exception("Not null DataArrayInt instance expected !");
          da2->checkAllocated();
-         int size=self->getNbOfElems();
+         int size=self->getNumberOfTuples();
          if(size!=self->getNumberOfTuples())
            {
              throw INTERP_KERNEL::Exception("Invalid list length ! Must be equal to number of tuples !");
@@ -2506,7 +2506,7 @@ namespace ParaMEDMEM
          if(!da2)
            throw INTERP_KERNEL::Exception("Not null DataArrayInt instance expected !");
          da2->checkAllocated();
-         int size=self->getNbOfElems();
+         int size=self->getNumberOfTuples();
          if(size!=self->getNumberOfTuples())
            {
              throw INTERP_KERNEL::Exception("Invalid list length ! Must be equal to number of tuples !");
@@ -2535,7 +2535,7 @@ namespace ParaMEDMEM
          if(!da2)
            throw INTERP_KERNEL::Exception("Not null DataArrayInt instance expected !");
          da2->checkAllocated();
-         int size=self->getNbOfElems();
+         int size=self->getNumberOfTuples();
          if(size!=self->getNumberOfTuples())
            {
              throw INTERP_KERNEL::Exception("Invalid list length ! Must be equal to number of tuples !");
index 8873fef74c63c87cd562e4cd77584ea362cddf89..d21a57e050210547afedbdeea130ddd433870944 100644 (file)
@@ -5896,6 +5896,15 @@ class MEDCouplingBasicsTest(unittest.TestCase):
         self.assertEqual(expected1,b.getValues())
         pass
 
+    def testSwigErrorRenum(self):
+        da=DataArrayDouble.New()
+        da.setValues([7.,107.,8.,108.,9.,109.,10.,110.,11.,111.,12.,112.,13.,113.,14.,114.,15.,115.,16.,116.],10,2)
+        d=DataArrayInt.New()
+        d.setValues([0,2,3,1,4,5,6,8,7,9],10,1)
+        da.renumberInPlace(d)
+        da.renumber(d)
+        pass
+
     def testSwigGetItem1(self):
         da=DataArrayInt.New()
         da.alloc(16,3)