Salome HOME
Merge branch 'BR_H2018_3' into BR_2018_V8_5
[modules/hydro.git] / src / HYDRO_tests / test_HYDROData_LandCoverMap.cxx
index 922a7c3351494a23936556333d809795d3ffc286..b1eb3e1a6e58335323f5f3df18a6c698d906f4e1 100644 (file)
@@ -835,8 +835,9 @@ void test_HYDROData_LandCoverMap::test_shp_import_cyp()
   HYDROData_ShapeFile anImporter;
   QStringList PolygonList;
   TopTools_SequenceOfShape PolygonFaces;
-  int Type = -1;
-  int aStat = anImporter.ImportPolygons(aDoc, aFileName, PolygonList, PolygonFaces, Type);
+
+  int aStat = anImporter.ImportPolygons(aDoc, aFileName, PolygonList, PolygonFaces);
+  int Type = anImporter.GetShapeType();
   CPPUNIT_ASSERT(aStat == 1);
   CPPUNIT_ASSERT_EQUAL(5, Type);
   CPPUNIT_ASSERT_EQUAL(268, PolygonFaces.Length());
@@ -865,8 +866,9 @@ void test_HYDROData_LandCoverMap::test_shp_import_clc_dec()
   HYDROData_ShapeFile anImporter;
   QStringList PolygonList;
   TopTools_SequenceOfShape PolygonFaces;
-  int Type = -1;
-  int aStat = anImporter.ImportPolygons(aDoc, aFileName, PolygonList, PolygonFaces, Type);
+  int aStat = anImporter.ImportPolygons(aDoc, aFileName, PolygonList, PolygonFaces);
+    int Type = anImporter.GetShapeType();
+
   CPPUNIT_ASSERT(aStat == 1);
   CPPUNIT_ASSERT_EQUAL(5, Type);
   CPPUNIT_ASSERT_EQUAL(625, PolygonFaces.Length());
@@ -895,8 +897,8 @@ void test_HYDROData_LandCoverMap::test_shp_import_nld_areas()
   HYDROData_ShapeFile anImporter;
   QStringList PolygonList;
   TopTools_SequenceOfShape PolygonFaces;
-  int Type = -1;
-  int aStat = anImporter.ImportPolygons(aDoc, aFileName, PolygonList, PolygonFaces, Type);
+  int aStat = anImporter.ImportPolygons(aDoc, aFileName, PolygonList, PolygonFaces);
+  int Type = anImporter.GetShapeType();
   CPPUNIT_ASSERT(aStat == 1);
   CPPUNIT_ASSERT_EQUAL(5, Type);
   CPPUNIT_ASSERT_EQUAL(127, PolygonFaces.Length());
@@ -931,10 +933,9 @@ void test_HYDROData_LandCoverMap::test_shp_loop_back()
     HYDROData_ShapeFile anImporter;
     QStringList PolygonList;
     TopTools_SequenceOfShape PolygonFaces;
-    int Type = -1;
 
     //import LCM from file (#2-4; #12-14 polygons)
-    CPPUNIT_ASSERT( anImporter.ImportPolygons(aDoc, aFFileName, PolygonList, PolygonFaces, Type));
+    CPPUNIT_ASSERT( anImporter.ImportPolygons(aDoc, aFFileName, PolygonList, PolygonFaces));
     Handle(HYDROData_LandCoverMap) LCM = Handle(HYDROData_LandCoverMap)::DownCast( aDoc->CreateObject( KIND_LAND_COVER_MAP ) );
     HYDROData_MapOfFaceToStricklerType aMapFace2ST;
 
@@ -965,10 +966,8 @@ void test_HYDROData_LandCoverMap::test_shp_loop_back()
     HYDROData_ShapeFile anImporter;
     QStringList PolygonList;
     TopTools_SequenceOfShape PolygonFaces;
-    int Type = -1;
-
     //import all
-    CPPUNIT_ASSERT( anImporter.ImportPolygons(aDoc, aSFileName, PolygonList, PolygonFaces, Type));
+    CPPUNIT_ASSERT( anImporter.ImportPolygons(aDoc, aSFileName, PolygonList, PolygonFaces));
     Handle(HYDROData_LandCoverMap) LCM = Handle(HYDROData_LandCoverMap)::DownCast( aDoc->CreateObject( KIND_LAND_COVER_MAP ) );
     HYDROData_MapOfFaceToStricklerType aMapFace2ST;
     CPPUNIT_ASSERT_EQUAL(PolygonFaces.Length(), 6);
@@ -1183,8 +1182,8 @@ void test_HYDROData_LandCoverMap::test_shp_clc_classification_perf()
   HYDROData_ShapeFile anImporter;
   QStringList PolygonList;
   TopTools_SequenceOfShape PolygonFaces;
-  int Type = -1;
-  int aStat = anImporter.ImportPolygons(aDoc, aFileName, PolygonList, PolygonFaces, Type);
+  int aStat = anImporter.ImportPolygons(aDoc, aFileName, PolygonList, PolygonFaces);
+  int Type = anImporter.GetShapeType();
   CPPUNIT_ASSERT(aStat == 1);
   CPPUNIT_ASSERT_EQUAL(5, Type);
   CPPUNIT_ASSERT_EQUAL(625, PolygonFaces.Length());
@@ -1250,8 +1249,7 @@ void test_HYDROData_LandCoverMap::test_shp_clc_classification_check()
   HYDROData_ShapeFile anImporter;
   QStringList PolygonList;
   TopTools_SequenceOfShape PolygonFaces;
-  int Type = -1;
-  int aStat = anImporter.ImportPolygons(aDoc, aFileName, PolygonList, PolygonFaces, Type);
+  int aStat = anImporter.ImportPolygons(aDoc, aFileName, PolygonList, PolygonFaces);
   CPPUNIT_ASSERT(aStat == 1);
   Handle(HYDROData_LandCoverMap) LCM = Handle(HYDROData_LandCoverMap)::DownCast( aDoc->CreateObject( KIND_LAND_COVER_MAP ) );
   HYDROData_MapOfFaceToStricklerType aMapFace2ST;