|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r66713 - in sandbox/SOC/2010/sweepline: boost/sweepline/detail libs/sweepline/test
From: sydorchuk.andriy_at_[hidden]
Date: 2010-11-24 11:22:57
Author: asydorchuk
Date: 2010-11-24 11:22:56 EST (Wed, 24 Nov 2010)
New Revision: 66713
URL: http://svn.boost.org/trac/boost/changeset/66713
Log:
Changes to compile without errors and warnings using gcc-4.4.5 compiler.
Text files modified:
sandbox/SOC/2010/sweepline/boost/sweepline/detail/voronoi_formation.hpp | 3 +--
sandbox/SOC/2010/sweepline/libs/sweepline/test/benchmark_test.cpp | 6 +++---
sandbox/SOC/2010/sweepline/libs/sweepline/test/output_verification.hpp | 4 ++--
sandbox/SOC/2010/sweepline/libs/sweepline/test/sweepline_test.cpp | 12 ++++++------
4 files changed, 12 insertions(+), 13 deletions(-)
Modified: sandbox/SOC/2010/sweepline/boost/sweepline/detail/voronoi_formation.hpp
==============================================================================
--- sandbox/SOC/2010/sweepline/boost/sweepline/detail/voronoi_formation.hpp (original)
+++ sandbox/SOC/2010/sweepline/boost/sweepline/detail/voronoi_formation.hpp 2010-11-24 11:22:56 EST (Wed, 24 Nov 2010)
@@ -1236,8 +1236,7 @@
// Intersection check.
if (site2.get_site_index() == site3.get_site_index()) {
return false;
- }
- const point_2d<T> &site = site1.get_point0();
+ }
const point_2d<T> &segm_start1 = site2.get_point1(true);
const point_2d<T> &segm_end1 = site2.get_point0(true);
const point_2d<T> &segm_start2 = site3.get_point0(true);
Modified: sandbox/SOC/2010/sweepline/libs/sweepline/test/benchmark_test.cpp
==============================================================================
--- sandbox/SOC/2010/sweepline/libs/sweepline/test/benchmark_test.cpp (original)
+++ sandbox/SOC/2010/sweepline/libs/sweepline/test/benchmark_test.cpp 2010-11-24 11:22:56 EST (Wed, 24 Nov 2010)
@@ -33,10 +33,10 @@
FILE *bench_file = fopen("benchmark.txt", "a");
fprintf(bench_file, "Voronoi Segment Sweepline Benchmark Test (time in seconds):\n");
-#ifdef _DEBUG
- int max_points = 1000;
-#else
+#ifdef NDEBUG
int max_points = 1000000;
+#else
+ int max_points = 1000;
#endif
for (int num_points = 10; num_points <= max_points; num_points *= 10) {
Modified: sandbox/SOC/2010/sweepline/libs/sweepline/test/output_verification.hpp
==============================================================================
--- sandbox/SOC/2010/sweepline/libs/sweepline/test/output_verification.hpp (original)
+++ sandbox/SOC/2010/sweepline/libs/sweepline/test/output_verification.hpp 2010-11-24 11:22:56 EST (Wed, 24 Nov 2010)
@@ -203,10 +203,10 @@
}
sort(segm_vec.begin(), segm_vec.end());
std::vector< std::pair<P, P> > dest_vec;
- std::vector< std::pair<P, P> >::iterator it, b_it, l_bound;
+ typename std::vector< std::pair<P, P> >::iterator it, b_it, l_bound;
for (it = segm_vec.begin(); it != segm_vec.end(); it++) {
std::pair<P, P> bound = std::make_pair(it->second, it->second);
- l_bound = std::upper_bound(segm_vec.begin(), segm_vec.end(), bound, segm_comparison<P>());
+ l_bound = upper_bound(segm_vec.begin(), segm_vec.end(), bound, segm_comparison<P>());
bool add = true;
for (b_it = it + 1; b_it != l_bound; b_it++) {
if (intersect(*it, *b_it)) {
Modified: sandbox/SOC/2010/sweepline/libs/sweepline/test/sweepline_test.cpp
==============================================================================
--- sandbox/SOC/2010/sweepline/libs/sweepline/test/sweepline_test.cpp (original)
+++ sandbox/SOC/2010/sweepline/libs/sweepline/test/sweepline_test.cpp 2010-11-24 11:22:56 EST (Wed, 24 Nov 2010)
@@ -11,9 +11,9 @@
#include <time.h>
#include "test_type_list.hpp"
-#include "output_verification.hpp"
#include "boost/sweepline/voronoi_sweepline.hpp"
using namespace boost::sweepline;
+#include "output_verification.hpp"
#define BOOST_TEST_MODULE voronoi_builder_test
#include <boost/test/test_case_template.hpp>
@@ -395,7 +395,7 @@
BOOST_CHECK_EQUAL(edge2_1->rot_next == edge1_1, true);
}
-#ifndef _DEBUG
+#ifdef NDEBUG
BOOST_AUTO_TEST_CASE_TEMPLATE(grid_test, T, test_types) {
voronoi_builder<T> test_builder;
voronoi_output_clipped<T> test_output_small, test_output_large;
@@ -427,7 +427,7 @@
}
#endif
-#ifndef _DEBUG
+#ifdef NDEBUG
BOOST_AUTO_TEST_CASE_TEMPLATE(random_test, T, test_types) {
srand(static_cast<unsigned int>(time(NULL)));
voronoi_builder<T> test_builder;
@@ -465,7 +465,7 @@
}
#endif
-#ifndef _DEBUG
+#ifdef NDEBUG
BOOST_AUTO_TEST_CASE_TEMPLATE(enormous_random_test, T, test_types) {
srand(static_cast<unsigned int>(time(NULL)));
voronoi_builder<T> test_builder;
@@ -653,7 +653,7 @@
VERIFY_VORONOI_OUTPUT(test_output, NO_HALF_EDGE_INTERSECTIONS);
}
-#ifndef _DEBUG
+#ifdef NDEBUG
BOOST_AUTO_TEST_CASE_TEMPLATE(segment_grid_test, T, test_types) {
voronoi_builder<T> test_builder;
voronoi_output_clipped<T> test_output_small, test_output_large;
@@ -696,7 +696,7 @@
}
#endif
-#ifndef _DEBUG
+#ifdef NDEBUG
BOOST_AUTO_TEST_CASE_TEMPLATE(segment_random_test, T, test_types) {
srand(static_cast<unsigned int>(time(NULL)));
voronoi_builder<T> test_builder;
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk