From a33eed08039515e7e75fbb0a1aa35912c3e06595 Mon Sep 17 00:00:00 2001 From: Efi Fogel Date: Tue, 29 Jul 2008 16:00:42 +0000 Subject: [PATCH] cleanup --- .../Arrangement_on_surface_2/Traits_test.h | 36 +++++++++---------- 1 file changed, 17 insertions(+), 19 deletions(-) diff --git a/Arrangement_on_surface_2/test/Arrangement_on_surface_2/Traits_test.h b/Arrangement_on_surface_2/test/Arrangement_on_surface_2/Traits_test.h index 1ad9343cf70..6ae568d381a 100644 --- a/Arrangement_on_surface_2/test/Arrangement_on_surface_2/Traits_test.h +++ b/Arrangement_on_surface_2/test/Arrangement_on_surface_2/Traits_test.h @@ -754,45 +754,43 @@ bool Traits_test:: boundary_near_x_wrapper_imp (std::istringstream & str_stream, CGAL::Arr_has_boundary_tag) { - CGAL::Arr_curve_end cv_end1, cv_end2; - unsigned int id1,id2; - //first argument must be a number (either a point or a xcurve) + CGAL::Comparison_result real_answer; + unsigned int id1, id2; + // first argument must be a number (either a point or a xcurve) str_stream >> id1; std::pair next_input = get_next_input(str_stream); - //second argument can be number or text (either xcurve or curve_end) - if (next_input.first == NUMBER) - { + // second argument can be number or text (either xcurve or curve_end) + if (next_input.first == NUMBER) { id2 = static_cast(next_input.second); next_input = get_next_input(str_stream); CGAL_assertion(next_input.first == CURVE_END); - cv_end1=static_cast(next_input.second); - CGAL::Comparison_result real_answer = - m_traits.compare_x_near_boundary_2_object() - (m_points[id1],m_xcurves[id2],cv_end1); + CGAL::Arr_curve_end cv_end1 = + static_cast(next_input.second); + real_answer = m_traits.compare_x_near_boundary_2_object() + (m_points[id1],m_xcurves[id2], cv_end1); std::cout << "Test: boundary_near_x( " << m_points[id1] << " , " << m_xcurves[id2]<< " , " << (cv_end1 == CGAL::ARR_MIN_END?"MIN_END":"MAX_END") << " ) ? "; } - else if (next_input.first == CURVE_END) - { - cv_end1=static_cast(next_input.second); + else if (next_input.first == CURVE_END) { + CGAL::Arr_curve_end cv_end1 = + static_cast(next_input.second); next_input = get_next_input(str_stream); CGAL_assertion(next_input.first == NUMBER); id2 = static_cast(next_input.second); next_input = get_next_input(str_stream); CGAL_assertion(next_input.first == CURVE_END); - cv_end2=static_cast(next_input.second); + CGAL::Arr_curve_end cv_end2 = + static_cast(next_input.second); real_answer = m_traits.compare_x_near_boundary_2_object() - (m_xcurves[id1],cv_end1,m_xcurves[id2],cv_end2); + (m_xcurves[id1],cv_end1,m_xcurves[id2], cv_end2); std::cout << "Test: boundary_near_x( " << m_xcurves[id1] << " , " << (cv_end1 == CGAL::ARR_MIN_END?"MIN_END , ":"MAX_END , ") << m_xcurves[id2]<< " , " << (cv_end2 == CGAL::ARR_MIN_END?"MIN_END":"MAX_END") << " ) ? "; } - else - { - CGAL_assertion(false); - } + else CGAL_error(); + next_input = get_next_input(str_stream); CGAL_assertion(next_input.first == SIGN); CGAL::Comparison_result exp_answer =