X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FHYDRO_tests%2Ftest_HYDROData_Profile.cxx;h=a4c6824fa8c5edb6e917dfe9cb173f91ba4cd3ce;hb=3bece499e83cc9ca95536228c7f6740030e9d5d8;hp=d4ebe9853740cd8175c5969636fdf727ce53455d;hpb=ab259fb906dc491712765e98efb34cc18b9fd183;p=modules%2Fhydro.git diff --git a/src/HYDRO_tests/test_HYDROData_Profile.cxx b/src/HYDRO_tests/test_HYDROData_Profile.cxx index d4ebe985..a4c6824f 100644 --- a/src/HYDRO_tests/test_HYDROData_Profile.cxx +++ b/src/HYDRO_tests/test_HYDROData_Profile.cxx @@ -47,7 +47,7 @@ bool test_HYDROData_Profile::createTestFile( const QString& theFileName, if ( theIsParametric ) { QTextStream anOutStream( &aTmpFile ); - + anOutStream << "0 182.15 \n"; anOutStream << "4 181.95 \n"; anOutStream << "10.18 181.63 \n"; @@ -96,20 +96,19 @@ void test_HYDROData_Profile::testFileImport() HYDROData_Iterator aDocIter( aDoc, KIND_PROFILE ); for ( ; aDocIter.More(); aDocIter.Next() ) { - Handle(HYDROData_Profile) aProfile = + Handle(HYDROData_Profile) aProfile = Handle(HYDROData_Profile)::DownCast( aDocIter.Current() ); if ( aProfile.IsNull() ) continue; - + CPPUNIT_ASSERT( aProfile->IsValid() == false ); CPPUNIT_ASSERT( aProfile->NbPoints() == 5 ); - + aProfileCount++; } - CPPUNIT_ASSERT( aProfileCount == 2 ); - Handle(HYDROData_Profile) aGeorefProfile = + Handle(HYDROData_Profile) aGeorefProfile = Handle(HYDROData_Profile)::DownCast( aDoc->CreateObject( KIND_PROFILE ) ); aFileName = TCollection_AsciiString( aGeorefFileName.toStdString().c_str() ); @@ -140,14 +139,14 @@ void test_HYDROData_Profile::testFileImport() void test_HYDROData_Profile::testCopy() { Handle(HYDROData_Document) aDoc = HYDROData_Document::Document(); - - Handle(HYDROData_Profile) aProfile1 = + + Handle(HYDROData_Profile) aProfile1 = Handle(HYDROData_Profile)::DownCast( aDoc->CreateObject( KIND_PROFILE ) ); QString aFileName = TMP_DIR + QDir::separator() + "georef.pa"; bool anIsFileCreated = createTestFile( aFileName, false ); - + if ( anIsFileCreated ) { bool notEmpty = false; @@ -159,7 +158,7 @@ void test_HYDROData_Profile::testCopy() CPPUNIT_ASSERT( aProfile1->NbPoints() == 5 ); } - Handle(HYDROData_Profile) aProfile2 = + Handle(HYDROData_Profile) aProfile2 = Handle(HYDROData_Profile)::DownCast( aDoc->CreateObject( KIND_PROFILE ) ); aProfile1->CopyTo( aProfile2, false );