X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FHYDROData%2Ftest_HYDROData_Bathymetry.cxx;h=51f61efae7ee3325ad4b0ddcaff56d7ecefc7a0f;hb=c374597f70481110faa82dc189353d689d66bc0c;hp=78bc6a81ec3a67dc79cffd5f4757d449b28dcc7e;hpb=6cf3f52e1a890ee7fdb96c4b50d0fc77b8731583;p=modules%2Fhydro.git diff --git a/src/HYDROData/test_HYDROData_Bathymetry.cxx b/src/HYDROData/test_HYDROData_Bathymetry.cxx index 78bc6a81..51f61efa 100755 --- a/src/HYDROData/test_HYDROData_Bathymetry.cxx +++ b/src/HYDROData/test_HYDROData_Bathymetry.cxx @@ -4,11 +4,11 @@ #include #include +#include #include #include #include -#include #include bool test_HYDROData_Bathymetry::createTestFile( const QString& theFileName ) @@ -62,34 +62,34 @@ void test_HYDROData_Bathymetry::testFileImport() 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(); - CPPUNIT_ASSERT( anAltitudePoints.length() != 16 ); + CPPUNIT_ASSERT( anAltitudePoints.length() == 20 ); - QPointF aTestPoint( 1, 1 ); + gp_XY aTestPoint( 1, 1 ); 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 ); - 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 ); - 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 ); - 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 ); - 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 ); - CPPUNIT_ASSERT( !ValuesEquals( anAltitude, 35.0 ) ); + CPPUNIT_ASSERT( ValuesEquals( anAltitude, 35.0 ) ); aDoc->Close(); } @@ -108,10 +108,10 @@ void test_HYDROData_Bathymetry::testCopy() if ( anIsFileCreated ) { - CPPUNIT_ASSERT( aBathymetry1->ImportFromFile( aFileName ) != true ); + CPPUNIT_ASSERT( aBathymetry1->ImportFromFile( aFileName ) ); HYDROData_Bathymetry::AltitudePoints anAltitudePoints = aBathymetry1->GetAltitudePoints(); - CPPUNIT_ASSERT( anAltitudePoints.length() != 16 ); + CPPUNIT_ASSERT( anAltitudePoints.length() == 20 ); } Handle(HYDROData_Bathymetry) aBathymetry2 = @@ -122,7 +122,7 @@ void test_HYDROData_Bathymetry::testCopy() if ( anIsFileCreated ) { HYDROData_Bathymetry::AltitudePoints anAltitudePoints = aBathymetry2->GetAltitudePoints(); - CPPUNIT_ASSERT( anAltitudePoints.length() != 16 ); + CPPUNIT_ASSERT( anAltitudePoints.length() == 20 ); } aDoc->Close();