]> SALOME platform Git repositories - modules/hydro.git/commitdiff
Salome HOME
HYDRO_tests working on install, building with yamm
authorPaul RASCLE <paul.rascle@edf.fr>
Mon, 9 May 2016 06:49:18 +0000 (08:49 +0200)
committerPaul RASCLE <paul.rascle@edf.fr>
Mon, 9 May 2016 06:49:18 +0000 (08:49 +0200)
src/HYDRO_tests/CMakeLists.txt
src/HYDRO_tests/reference_data/CLC06-cut_1.dbf [new file with mode: 0644]
src/HYDRO_tests/reference_data/CLC06-cut_1.shp [new file with mode: 0644]
src/HYDRO_tests/reference_data/CLC06-cut_1.shx [new file with mode: 0644]
src/HYDRO_tests/test_HYDROData_LandCoverMap.cxx
src/HYDRO_tests/test_HYDROData_Main.cxx

index 35932e151eb2b824d0cc1a713eed597f66446447..b77ef9533554eaac2674d228bfb81643535cbac3 100644 (file)
@@ -59,7 +59,7 @@ IF( ${WIN32} )
   add_definitions( -DWNT )
 ENDIF()
 
-SET( CPPUNIT_INCLUDES $ENV{CPPUNIT_ROOT}/include )
+SET( CPPUNIT_INCLUDES $ENV{cppUNIT_ROOT}/include )
 SET( CAS_INCLUDES $ENV{CASROOT}/inc )
 SET( QT_INCLUDES $ENV{QTDIR}/include $ENV{QTDIR}/include/QtCore $ENV{QTDIR}/include/QtGui $ENV{QTDIR}/include/QtTest )
 SET( KERNEL_INCLUDES $ENV{KERNEL_ROOT_DIR}/include/salome )
@@ -80,7 +80,7 @@ ELSE()
   SET( QT_LIBRARIES QtCore QtGui QtTest )
 ENDIF()
 
-link_directories( $ENV{CPPUNIT_ROOT}/lib )
+link_directories( $ENV{cppUNIT_ROOT}/lib )
 IF( ${WIN32} )
   SET( CPPUNIT_LIBRARIES cppunitd )
 ELSE()
@@ -111,3 +111,5 @@ target_link_libraries( HYDROData_tests ${GUI_LIBRARIES} ${GEOM_LIBRARIES} ${CAS_
 IF( ${WIN32} )
   add_custom_command( TARGET HYDROData_tests POST_BUILD COMMAND $(TargetPath) COMMENT "Running tests" )
 ENDIF()
+
+INSTALL(TARGETS HYDROData_tests EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_BINS})
diff --git a/src/HYDRO_tests/reference_data/CLC06-cut_1.dbf b/src/HYDRO_tests/reference_data/CLC06-cut_1.dbf
new file mode 100644 (file)
index 0000000..5b19ee2
Binary files /dev/null and b/src/HYDRO_tests/reference_data/CLC06-cut_1.dbf differ
diff --git a/src/HYDRO_tests/reference_data/CLC06-cut_1.shp b/src/HYDRO_tests/reference_data/CLC06-cut_1.shp
new file mode 100644 (file)
index 0000000..bf683c3
Binary files /dev/null and b/src/HYDRO_tests/reference_data/CLC06-cut_1.shp differ
diff --git a/src/HYDRO_tests/reference_data/CLC06-cut_1.shx b/src/HYDRO_tests/reference_data/CLC06-cut_1.shx
new file mode 100644 (file)
index 0000000..e96b5f1
Binary files /dev/null and b/src/HYDRO_tests/reference_data/CLC06-cut_1.shx differ
index 154e95eabd55c7ec36134f3a813b504d4e8e23d9..5adf002a7c73ed8bee3a81546c7a684d4e1a33fa 100644 (file)
 #include <BRep_Builder.hxx>
 #include <BRepCheck_Analyzer.hxx>
 
-const QString REF_DATA_PATH = qgetenv( "HYDRO_REFERENCE_DATA" );
-const QString DEF_STR_PATH = qgetenv( "HYDRO_SRC_DIR" ) + "/src/HYDROGUI/resources/def_strickler_table.txt";
+#define _DEVDEBUG_
+#include "HYDRO_trace.hxx"
+
+//const QString REF_DATA_PATH = qgetenv( "HYDRO_REFERENCE_DATA" );
+const QString REF_DATA_PATH = qgetenv( "HYDRO_DIR" ) + "/../../src/HYDRO/src/HYDRO_tests/reference_data";
+const QString DEF_STR_PATH = qgetenv( "HYDRO_DIR" ) + "/../../src/HYDRO/src/HYDROGUI/resources/def_strickler_table.txt";
 
 void test_HYDROData_LandCoverMap::test_add_2_objects()
 {
@@ -882,13 +886,17 @@ void test_HYDROData_LandCoverMap::test_shp_loop_back()
 {
   QString aFFileName = REF_DATA_PATH + "/CLC06-cut_1.shp";
   QString aSFileName = REF_DATA_PATH + "/CLC06-cut_1_res.shp";
+
   //This test verify only some geom data (shp+shx) without any dbf reading/writing 
   {
+    DEBTRACE("aFFileName: " << aFFileName.toStdString());
+    DEBTRACE("aSFileName: " << aSFileName.toStdString());
     Handle(HYDROData_Document) aDoc = HYDROData_Document::Document(1);
     HYDROData_ShapeFile anImporter;
     QStringList PolygonList;
     TopTools_SequenceOfShape PolygonFaces;
     int Type = -1;
+    DEBTRACE("---");
 
     //import LCM from file (#2-4; #12-14 polygons)
     CPPUNIT_ASSERT( anImporter.ImportPolygons(aDoc, aFFileName, PolygonList, PolygonFaces, Type));
@@ -901,6 +909,7 @@ void test_HYDROData_LandCoverMap::test_shp_loop_back()
     aMapFace2ST.Add( TopoDS::Face( PolygonFaces(12) ), "" );
     aMapFace2ST.Add( TopoDS::Face( PolygonFaces(13) ), "" );
     aMapFace2ST.Add( TopoDS::Face( PolygonFaces(14) ), "" );
+    DEBTRACE("---");
 
     LCM->StoreLandCovers(aMapFace2ST);
     LCM->SetName("lcm_1");
@@ -914,6 +923,7 @@ void test_HYDROData_LandCoverMap::test_shp_loop_back()
     QStringList aNonExpList;
     anExporter.Export(aSFileName, LCM, aNonExpList);
     CPPUNIT_ASSERT (aNonExpList.empty());
+    DEBTRACE("---");
 
     aDoc->Close();
   }
index 74bb9315a863e903d4f1108102d06f6913aa95a9..c4e3239eda879a707c2e43451807ec10bba78879 100644 (file)
@@ -34,6 +34,7 @@ int main( int argc, char* argv[] )
 {
   QApplication anApp( argc, argv );
   SUIT_Session aSession;
+  aSession.startApplication("std");
 
   OCCViewer_ViewWindow* aWindow = TestViewer::viewWindow();