#include <QTextStream>
#include <QFileInfo>
+#define _DEVDEBUG_
+#include "HYDRO_trace.hxx"
+
const char TELEMAC_FORMAT = 'f';
const int TELEMAC_PRECISION = 3;
aShapesList.Append( anIt.Face() );
aShapesList.Append( theNewShape );
+ DEBTRACE("theNewType " << theNewType);
if( aShapesList.Size()==1 && theNewShape.ShapeType()==TopAbs_FACE )
{
+ DEBTRACE("---");
aNewFaces.Add( TopoDS::Face( theNewShape ), theNewType );
StoreLandCovers( aNewFaces );
return true;
}
+ DEBTRACE("---");
// prepare pave filler
aPaveFiller.SetArguments( aShapesList );
aPaveFiller.Perform();
if( anError )
return false;
+ DEBTRACE("---");
// add faces to builder
BOPAlgo_Builder aBuilder;
anIt.Init( *this );
for( ; aMIt.More(); aMIt.Next() )
{
//std::cout << " " << aMIt.Value() << std::endl;
+ DEBTRACE(aMIt.Value());
int aKey = (int)(uintptr_t)aMIt.Value().TShape().operator->();
aShapesFromNewFace.Add( aKey );
}
for( ; anIt.More(); anIt.Next() )
{
QString aSType = anIt.StricklerType();
+ DEBTRACE(anIt.StricklerType());
//std::cout << "from " << anIt.Face() << ": " << anIt.StricklerType() << std::endl;
TopTools_ListOfShape aModified = aBuilder.Modified( anIt.Face() );
//
aNewFaces.Add( TopoDS::Face( aShape ), aSType );
}
}
-
+ DEBTRACE("---");
// c. add the new shape if it is face with its type
if( theNewShape.ShapeType()==TopAbs_FACE )
aNewFaces.Add( TopoDS::Face( theNewShape ), theNewType );
+ADD_SUBDIRECTORY(reference_data)
include(../../CMake/Common.cmake)
include(ExternalFiles.cmake)
{
QImage anActualImage = viewWindow()->dumpView();
- QString anExpectedRefFilePath = qgetenv( "HYDRO_DIR" ) + "/../../src/HYDRO/src/HYDRO_tests/reference_data";
+ QString anExpectedRefFilePath = qgetenv( "HYDRO_ROOT_DIR" ) + "/bin/salome/test/HYDRO";
anExpectedRefFilePath += "/" + myKey + ".png";
QImage anExpectedRefImage;
anExpectedRefImage.load( anExpectedRefFilePath );
int theLinesToOmit,
QString& theMsg )
{
- QString anExpectedRefFilePath = qgetenv( "HYDRO_DIR" ) + "/../../src/HYDRO/src/HYDRO_tests/reference_data";
+ QString anExpectedRefFilePath = qgetenv( "HYDRO_ROOT_DIR" ) + "/bin/salome/test/HYDRO";
anExpectedRefFilePath += "/" + theBaseName;
QString anActualFilePath = QDir::tempPath() + "/" + theBaseName;
--- /dev/null
+# Copyright (C) 2012-2015 CEA/DEN, EDF R&D, OPEN CASCADE
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+#
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+
+# examples that cant be used for testing because they use external mesher plug-ins
+
+
+SET(REFERENCE_DATA
+ Channel.png
+ CLC06.cst
+ CLC06-cut_1.dbf
+ CLC06-cut_1_res.png
+ CLC06-cut_1_res.shx
+ CLC06-cut_1.shp
+ CLC06-cut_1.shx
+ CLC06.dbf
+ CLC06.prj
+ CLC06.shp
+ CLC06.shx
+ clc_dec_150_350.png
+ CLC_decoupe.prj
+ CLC_decoupe.qpj
+ CLC_decoupe.shp
+ CLC_decoupe.shx
+ cyprus_natural_all.png
+ cyprus_natural.dbf
+ cyprus_natural.prj
+ cyprus_natural.shp
+ cyprus_natural.shx
+ Extraction_Channel.png
+ Extraction_ImmZone.png
+ ff1.brep
+ ff2.brep
+ ff3.brep
+ LandCoverMap_Add_2_Objects.png
+ LandCoverMap_Merge_1.png
+ LandCoverMap_Merge_2.png
+ LandCoverMap_PrsByCoeff.png
+ LandCoverMap_PrsByTypes.png
+ LandCoverMap_Remove_1.png
+ LandCoverMap_Split_1.png
+ LandCoverMap_Split_2.png
+ LandCoverMap_Split_Polyline.png
+ LandCoverMap_TransparentPrs.png
+ LandCover_Triangles.png
+ LandCover_Triangles_Split.png
+ lc_dump.dbf
+ lc_dump.py
+ LCM_copied.png
+ lcm_poly_2_sections.png
+ LCM_split_2a.png
+ LCM_split_2b.png
+ merge_faces_boxes_11.png
+ merge_faces_boxes_12.png
+ merge_faces_boxes_13.png
+ merge_faces_boxes_14.png
+ merge_faces_boxes_21.png
+ merge_faces_boxes_22.png
+ merge_faces_boxes_23.png
+ merge_faces_boxes_24.png
+ merge_faces_circles_11.png
+ merge_faces_circles_12.png
+ merge_faces_circles_13.png
+ merge_faces_circles_14.png
+ merge_faces_circles_21.png
+ merge_faces_circles_22.png
+ merge_faces_circles_23.png
+ merge_faces_circles_24.png
+ Merge_Polylines.png
+ NLD_water_areas_dcw.dbf
+ NLD_water_areas_dcw.png
+ NLD_water_areas_dcw.prj
+ NLD_water_areas_dcw.shp
+ NLD_water_areas_dcw.shx
+ Polyline_Presentation.png
+ pp1.brep
+ pp2.brep
+ pp3.brep
+ pp4.brep
+ ref_dbf1.dbf
+ ref_dbf2.dbf
+ ref_dbf3.dbf
+ Shape_preview_im_zone.png
+ Split_Polylines_Colors.png
+ Split_Straight.png
+ st_dump.py
+ t1.dbf
+ test_LCM.dbf
+ test.telemac
+)
+
+# Application tests
+
+SET(TEST_INSTALL_DIRECTORY ${SALOME_INSTALL_SCRIPT_SCRIPTS}/test)
+INSTALL(FILES ${REFERENCE_DATA} DESTINATION ${TEST_INSTALL_DIRECTORY})
#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";
+const QString REF_DATA_PATH = qgetenv( "HYDRO_ROOT_DIR" ) + "/bin/salome/test/HYDRO";
+const QString DEF_STR_PATH = qgetenv( "HYDRO_ROOT_DIR" ) + "/share/salome/resources/hydro/def_strickler_table.txt";
void test_HYDROData_LandCoverMap::test_add_2_objects()
{
CppUnit::TestFactoryRegistry::getRegistry();
// Add the top suite to the test runner
TestLib_Runner runner;
- QString aPath = qgetenv( "HYDRO_SRC_DIR" ) + "/src/tests.cfg";
- runner.Load( aPath.toStdString() );
+ //QString aPath = qgetenv( "HYDRO_SRC_DIR" ) + "/src/tests.cfg";
+ //runner.Load( aPath.toStdString() );
runner.addTest( registry.makeTest() );
try
{
#include <QStringList>
#include <vector>
-const QString REF_PATH = qgetenv( "HYDRO_DIR" ) + "/../../src/HYDRO/src/HYDRO_tests/reference_data";
+const QString REF_PATH = qgetenv( "HYDRO_ROOT_DIR" ) + "/bin/salome/test/HYDRO";
bool test_HYDROData_ShapeFile::compare_two_files(const QString& File1, const QString& File2)
{
#include <QStringList>
#include <QTableWidget>
-const QString DEF_STR_PATH = qgetenv( "HYDRO_SRC_DIR" ) + "/src/HYDROGUI/resources/def_strickler_table.txt";
+const QString DEF_STR_PATH = qgetenv( "HYDRO_ROOT_DIR" ) + "/share/salome/resources/hydro/def_strickler_table.txt";
void test_HYDROData_StricklerTable::test_import()
{
CPPUNIT_ASSERT_EQUAL( 8, aTypes.size() );
CPPUNIT_ASSERT_EQUAL( QString( "CODE_06" ), aTable->GetAttrName() );
- QString aType = "Zones de champs cultivé à végétation basse";
+ QString aType = "Zones de champs cultivé à végétation basse";
CPPUNIT_ASSERT_EQUAL( aType, aTypes[3] );
CPPUNIT_ASSERT_EQUAL( QColor( 255, 255, 0 ), aTable->GetColor( aType ) );
CPPUNIT_ASSERT_EQUAL( QString( "512" ), aTable->GetAttrValue( aType ) );
- aType = "Zones à forte urbanization (agglomération)";
+ aType = "Zones à forte urbanization (agglomération)";
CPPUNIT_ASSERT_EQUAL( aType, aTypes[7] );
CPPUNIT_ASSERT_EQUAL( QColor( 18, 52, 86 ), aTable->GetColor( aType ) );
CPPUNIT_ASSERT_EQUAL( QString( "" ), aTable->GetAttrValue( aType ) );
CPPUNIT_ASSERT_EQUAL( true, aTable->Import( DEF_STR_PATH ) );
- CPPUNIT_ASSERT_EQUAL( QString( "Zones de champs cultivé à végétation basse" ), aTable->GetType( "512" ) );
+ CPPUNIT_ASSERT_EQUAL( QString( "Zones de champs cultivé à végétation basse" ), aTable->GetType( "512" ) );
CPPUNIT_ASSERT_EQUAL( QString( "" ), aTable->GetType( "123" ) );
CPPUNIT_ASSERT_EQUAL( QString( "" ), aTable->GetType( "" ) );