From a9274f29afe3d97ff27455ebf8d92aff201ca4d6 Mon Sep 17 00:00:00 2001 From: Shai Hirsch Date: Thu, 19 Jul 2001 13:11:41 +0000 Subject: [PATCH] Added std:: prefix. --- .../include/Segment_circle_traits_test.h | 67 ++++++++++--------- 1 file changed, 34 insertions(+), 33 deletions(-) diff --git a/Packages/Arrangement/test/Arrangement_2_Traits/include/Segment_circle_traits_test.h b/Packages/Arrangement/test/Arrangement_2_Traits/include/Segment_circle_traits_test.h index d171eac3270..b39f7ed5d10 100644 --- a/Packages/Arrangement/test/Arrangement_2_Traits/include/Segment_circle_traits_test.h +++ b/Packages/Arrangement/test/Arrangement_2_Traits/include/Segment_circle_traits_test.h @@ -28,13 +28,13 @@ public Base_traits_test {} // Read a curve. - virtual void read_curve (ifstream& is, Curve& cv); + virtual void read_curve (std::ifstream& is, Curve& cv); // Test the make_x_monotone function. - virtual bool make_x_monotone_wrapper (istrstream& str_line); + virtual bool make_x_monotone_wrapper (std::istrstream& str_line); // Test the curve_split function. - virtual bool curve_split_wrapper (istrstream& str_line); + virtual bool curve_split_wrapper (std::istrstream& str_line); }; //--------------------------------------------------------------------- @@ -42,13 +42,13 @@ public Base_traits_test // template void Segment_circle_traits_test:: -read_curve (ifstream& is, Curve& cv) +read_curve (std::ifstream& is, Curve& cv) { // Read a line from the input file. char one_line[128]; skip_comments (is, one_line); - istrstream str_line( one_line, 128 ); + std::istrstream str_line( one_line, 128 ); // Get the arc type. char type; @@ -105,8 +105,8 @@ read_curve (ifstream& is, Curve& cv) else { // Illegal type! - cout << "Failed to read the curve specified by '" - << one_line << "'" << endl; + std::cout << "Failed to read the curve specified by '" + << one_line << "'" << std::endl; } return; @@ -120,7 +120,7 @@ read_curve (ifstream& is, Curve& cv) // template bool Segment_circle_traits_test:: -make_x_monotone_wrapper (istrstream& str_line) +make_x_monotone_wrapper (std::istrstream& str_line) { // Read the inputs. int cv_index; @@ -128,24 +128,25 @@ make_x_monotone_wrapper (istrstream& str_line) str_line >> cv_index >> n_exp_curves; - cout << "Test: make_x_monotone( Curve" << cv_index << " ) ? " << endl; + std::cout << "Test: make_x_monotone( Curve" << cv_index << " ) ? " + << std::endl; // Make x-monotone ! - list x_curves; + std::list x_curves; tr.make_x_monotone (all_curves_vec[cv_index], x_curves); int n_act_curves = static_cast(x_curves.size()); if (n_act_curves == n_exp_curves) { - cout << "Was successful" << endl; + std::cout << "Was successful" << std::endl; return (true); } else { - cout << "Was NOT successful" << endl; - cout << "Expected " << n_exp_curves << " x-monotone curves, " - << "recieved " << n_act_curves << endl; + std::cout << "Was NOT successful" << std::endl; + std::cout << "Expected " << n_exp_curves << " x-monotone curves, " + << "recieved " << n_act_curves << std::endl; return (false); } } @@ -159,38 +160,38 @@ make_x_monotone_wrapper (istrstream& str_line) // template bool Segment_circle_traits_test:: -curve_split_wrapper (istrstream& str_line) +curve_split_wrapper (std::istrstream& str_line) { // Read the inputs. int cv_index, pt_index; str_line >> cv_index >> pt_index; - cout << "Test: curve_split( Curve" << cv_index + std::cout << "Test: curve_split( Curve" << cv_index << ", " << all_points_vec[pt_index] - << " ) ? " << endl; + << " ) ? " << std::endl; // Check some preconditions. if (! tr.is_x_monotone(all_curves_vec[cv_index])) { - cout << "Was NOT successful" << endl; - cout << "Precondition fault: Input curve is not x-monotone" << endl; + std::cout << "Was NOT successful" << std::endl; + std::cout << "Precondition fault: Input curve is not x-monotone" << std::endl; return (false); } if (tr.curve_get_point_status (all_curves_vec[cv_index], all_points_vec[pt_index]) != tr.ON_CURVE) { - cout << "Was NOT successful" << endl; - cout << "Precondition fault: Split point is not on the curve" << endl; + std::cout << "Was NOT successful" << std::endl; + std::cout << "Precondition fault: Split point is not on the curve" << std::endl; return (false); } if (all_curves_vec[cv_index].source() == all_points_vec[pt_index] || all_curves_vec[cv_index].target() == all_points_vec[pt_index]) { - cout << "Was NOT successful" << endl; - cout << "Precondition fault: Split point is an end point of the curve" - << endl; + std::cout << "Was NOT successful" << std::endl; + std::cout << "Precondition fault: Split point is an end point of the curve" + << std::endl; return (false); } @@ -204,33 +205,33 @@ curve_split_wrapper (istrstream& str_line) // Check the results. if (cv1.source() != all_curves_vec[cv_index].source()) { - cout << "Was NOT successful" << endl; - cout << "Source points of first parts are different" << endl; + std::cout << "Was NOT successful" << std::endl; + std::cout << "Source points of first parts are different" << std::endl; return (false); } if (cv1.target() != all_points_vec[pt_index]) { - cout << "Was NOT successful" << endl; - cout << "Target points of first parts are different" << endl; + std::cout << "Was NOT successful" << std::endl; + std::cout << "Target points of first parts are different" << std::endl; return (false); } if (cv2.source() != all_points_vec[pt_index]) { - cout << "Was NOT successful" << endl; - cout << "Source points of second parts are different" << endl; + std::cout << "Was NOT successful" << std::endl; + std::cout << "Source points of second parts are different" << std::endl; return (false); } if( cv2.target() != all_curves_vec[cv_index].target()) { - cout << "Was NOT successful" << endl; - cout << "Target points of second are different" << endl; + std::cout << "Was NOT successful" << std::endl; + std::cout << "Target points of second are different" << std::endl; return (false); } - cout << "Was successfull" << endl; + std::cout << "Was successfull" << std::endl; return (true); }