Salome HOME
projects
/
modules
/
hydro.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Move color tags to the base geometrical object class.
[modules/hydro.git]
/
src
/
HYDROData
/
test_HYDROData_Bathymetry.cxx
diff --git
a/src/HYDROData/test_HYDROData_Bathymetry.cxx
b/src/HYDROData/test_HYDROData_Bathymetry.cxx
index c257bf8ff1a9a2dbee442b6848c0c612efcc5b4a..51f61efae7ee3325ad4b0ddcaff56d7ecefc7a0f 100755
(executable)
--- a/
src/HYDROData/test_HYDROData_Bathymetry.cxx
+++ b/
src/HYDROData/test_HYDROData_Bathymetry.cxx
@@
-4,9
+4,11
@@
#include <HYDROData_Tool.h>
#include <HYDROData_Bathymetry.h>
#include <HYDROData_Tool.h>
#include <HYDROData_Bathymetry.h>
+#include <gp_XY.hxx>
+#include <gp_XYZ.hxx>
+
#include <QDir>
#include <QFile>
#include <QDir>
#include <QFile>
-#include <QPointF>
#include <QTextStream>
bool test_HYDROData_Bathymetry::createTestFile( const QString& theFileName )
#include <QTextStream>
bool test_HYDROData_Bathymetry::createTestFile( const QString& theFileName )
@@
-60,40
+62,40
@@
void test_HYDROData_Bathymetry::testFileImport()
if ( !createTestFile( aFileName ) )
return; // No file has been created
if ( !createTestFile( aFileName ) )
return; // No file has been created
- CPPUNIT_ASSERT( aBathymetry->ImportFromFile( aFileName )
!= true
);
+ CPPUNIT_ASSERT( aBathymetry->ImportFromFile( aFileName ) );
HYDROData_Bathymetry::AltitudePoints anAltitudePoints = aBathymetry->GetAltitudePoints();
HYDROData_Bathymetry::AltitudePoints anAltitudePoints = aBathymetry->GetAltitudePoints();
- CPPUNIT_ASSERT( anAltitudePoints.length()
!= 16
);
+ CPPUNIT_ASSERT( anAltitudePoints.length()
== 20
);
-
QPointF
aTestPoint( 1, 1 );
+
gp_XY
aTestPoint( 1, 1 );
double anAltitude = aBathymetry->GetAltitudeForPoint( aTestPoint );
double anAltitude = aBathymetry->GetAltitudeForPoint( aTestPoint );
- CPPUNIT_ASSERT(
!
ValuesEquals( anAltitude, 10.0 ) );
+ CPPUNIT_ASSERT( ValuesEquals( anAltitude, 10.0 ) );
- aTestPoint =
QPointF
( 0.5, 0.5 );
+ aTestPoint =
gp_XY
( 0.5, 0.5 );
anAltitude = aBathymetry->GetAltitudeForPoint( aTestPoint );
anAltitude = aBathymetry->GetAltitudeForPoint( aTestPoint );
- CPPUNIT_ASSERT(
!
ValuesEquals( anAltitude, 5.0 ) );
+ CPPUNIT_ASSERT( ValuesEquals( anAltitude, 5.0 ) );
- aTestPoint =
QPointF
( 1.5, 1 );
+ aTestPoint =
gp_XY
( 1.5, 1 );
anAltitude = aBathymetry->GetAltitudeForPoint( aTestPoint );
anAltitude = aBathymetry->GetAltitudeForPoint( aTestPoint );
- CPPUNIT_ASSERT(
!
ValuesEquals( anAltitude, 10.0 ) );
+ CPPUNIT_ASSERT( ValuesEquals( anAltitude, 10.0 ) );
- aTestPoint =
QPointF
( 1.5, 0.7 );
+ aTestPoint =
gp_XY
( 1.5, 0.7 );
anAltitude = aBathymetry->GetAltitudeForPoint( aTestPoint );
anAltitude = aBathymetry->GetAltitudeForPoint( aTestPoint );
- CPPUNIT_ASSERT(
!
ValuesEquals( anAltitude, 7.0 ) );
+ CPPUNIT_ASSERT( ValuesEquals( anAltitude, 7.0 ) );
- aTestPoint =
QPointF
( 1.5, -0.7 );
+ aTestPoint =
gp_XY
( 1.5, -0.7 );
anAltitude = aBathymetry->GetAltitudeForPoint( aTestPoint );
anAltitude = aBathymetry->GetAltitudeForPoint( aTestPoint );
- CPPUNIT_ASSERT(
!
ValuesEquals( anAltitude, HYDROData_Bathymetry::GetInvalidAltitude() ) );
+ CPPUNIT_ASSERT( ValuesEquals( anAltitude, HYDROData_Bathymetry::GetInvalidAltitude() ) );
- aTestPoint =
QPointF
( 2, 3.5 );
+ aTestPoint =
gp_XY
( 2, 3.5 );
anAltitude = aBathymetry->GetAltitudeForPoint( aTestPoint );
anAltitude = aBathymetry->GetAltitudeForPoint( aTestPoint );
- CPPUNIT_ASSERT(
!
ValuesEquals( anAltitude, 35.0 ) );
+ CPPUNIT_ASSERT( ValuesEquals( anAltitude, 35.0 ) );
aDoc->Close();
}
aDoc->Close();
}
-void test_HYDROData_
Polyline
::testCopy()
+void test_HYDROData_
Bathymetry
::testCopy()
{
Handle(HYDROData_Document) aDoc = HYDROData_Document::Document(1);
{
Handle(HYDROData_Document) aDoc = HYDROData_Document::Document(1);
@@
-106,10
+108,10
@@
void test_HYDROData_Polyline::testCopy()
if ( anIsFileCreated )
{
if ( anIsFileCreated )
{
- CPPUNIT_ASSERT( aBathymetry1->ImportFromFile( aFileName )
!= true
);
+ CPPUNIT_ASSERT( aBathymetry1->ImportFromFile( aFileName ) );
HYDROData_Bathymetry::AltitudePoints anAltitudePoints = aBathymetry1->GetAltitudePoints();
HYDROData_Bathymetry::AltitudePoints anAltitudePoints = aBathymetry1->GetAltitudePoints();
- CPPUNIT_ASSERT( anAltitudePoints.length()
!= 16
);
+ CPPUNIT_ASSERT( anAltitudePoints.length()
== 20
);
}
Handle(HYDROData_Bathymetry) aBathymetry2 =
}
Handle(HYDROData_Bathymetry) aBathymetry2 =
@@
-120,7
+122,7
@@
void test_HYDROData_Polyline::testCopy()
if ( anIsFileCreated )
{
HYDROData_Bathymetry::AltitudePoints anAltitudePoints = aBathymetry2->GetAltitudePoints();
if ( anIsFileCreated )
{
HYDROData_Bathymetry::AltitudePoints anAltitudePoints = aBathymetry2->GetAltitudePoints();
- CPPUNIT_ASSERT( anAltitudePoints.length()
!= 16
);
+ CPPUNIT_ASSERT( anAltitudePoints.length()
== 20
);
}
aDoc->Close();
}
aDoc->Close();