]> SALOME platform Git repositories - modules/hydro.git/commitdiff
Salome HOME
update of the test for classifier
authorasl <asl@opencascade.com>
Fri, 9 Dec 2016 11:18:38 +0000 (14:18 +0300)
committerasl <asl@opencascade.com>
Fri, 9 Dec 2016 11:18:38 +0000 (14:18 +0300)
src/HYDRO_tests/test_HYDROData_DTM.cxx

index 66547b5e7b219dad8730e955c5684129e679c710..136b8e5a12011bd9e733af7ff29f9d5308d06a04 100644 (file)
@@ -638,18 +638,27 @@ void test_HYDROData_DTM::test_classifier_1()
   points.push_back( gp_XY( 43.4842, 3.33176  ) );
   points.push_back( gp_XY( -125.777, 2.24728 ) );
   points.push_back( gp_XY( -60.1628, 168.262 ) );
+  points.push_back( gp_XY( 21.8055587645, 154.699344457 ) );
+  points.push_back( gp_XY( -84.4764138524, 79.2606012276 ) );
+  points.push_back( gp_XY( -73.4132070504, 69.7096313266 ) );
 
   std::vector<double> values = aCase->GetStricklerCoefficientForPoints( points, 0.0, true );
-  CPPUNIT_ASSERT_EQUAL( 3, (int)values.size() );
+  CPPUNIT_ASSERT_EQUAL( 6, (int)values.size() );
   CPPUNIT_ASSERT_DOUBLES_EQUAL( 1.0123, values[0], EPS );
   CPPUNIT_ASSERT_DOUBLES_EQUAL( 1.0123, values[1], EPS );
   CPPUNIT_ASSERT_DOUBLES_EQUAL( 1.0221, values[2], EPS );
+  CPPUNIT_ASSERT_DOUBLES_EQUAL( 1.0123, values[3], EPS );
+  CPPUNIT_ASSERT_DOUBLES_EQUAL( 1.0123, values[4], EPS );
+  CPPUNIT_ASSERT_DOUBLES_EQUAL( 1.0123, values[5], EPS );
 
   std::vector<int> types = aCase->GetStricklerTypeForPoints( points );
-  CPPUNIT_ASSERT_EQUAL( 3, (int)types.size() );
+  CPPUNIT_ASSERT_EQUAL( 6, (int)types.size() );
   CPPUNIT_ASSERT_EQUAL( 123, types[0] );
   CPPUNIT_ASSERT_EQUAL( 123, types[1] );
   CPPUNIT_ASSERT_EQUAL( 221, types[2] );
+  CPPUNIT_ASSERT_EQUAL( 123, types[3] );
+  CPPUNIT_ASSERT_EQUAL( 123, types[4] );
+  CPPUNIT_ASSERT_EQUAL( 123, types[5] );
 
   aDoc->Close();
 }