|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r51054 - sandbox/SOC/2007/visualization/libs/svg_plot/test
From: pbristow_at_[hidden]
Date: 2009-02-06 12:06:33
Author: pbristow
Date: 2009-02-06 12:06:33 EST (Fri, 06 Feb 2009)
New Revision: 51054
URL: http://svn.boost.org/trac/boost/changeset/51054
Log:
Tests OK after changes to handling of blank == blank (no longer a NaN style comparison)
Text files modified:
sandbox/SOC/2007/visualization/libs/svg_plot/test/2d_color_consistency.cpp | 2 +-
sandbox/SOC/2007/visualization/libs/svg_plot/test/Jamfile.v2 | 5 +++--
sandbox/SOC/2007/visualization/libs/svg_plot/test/test_svg.cpp | 14 ++++++++++----
3 files changed, 14 insertions(+), 7 deletions(-)
Modified: sandbox/SOC/2007/visualization/libs/svg_plot/test/2d_color_consistency.cpp
==============================================================================
--- sandbox/SOC/2007/visualization/libs/svg_plot/test/2d_color_consistency.cpp (original)
+++ sandbox/SOC/2007/visualization/libs/svg_plot/test/2d_color_consistency.cpp 2009-02-06 12:06:33 EST (Fri, 06 Feb 2009)
@@ -9,7 +9,7 @@
// or copy at http://www.boost.org/LICENSE_1_0.txt)
#ifdef _MSC_VER
-# pragma warning(disable : 4996) //
+# pragma warning(disable : 4996) // Deprecated.
# pragma warning(disable : 4267) // '=' : conversion from 'size_t' to 'unsigned int' in spirit
# pragma warning(disable : 4180) // warning C4180: qualifier applied to function type has no meaning; ignored
# pragma warning(disable : 4172) // warning C4180: qualifier applied to function type has no meaning; ignored
Modified: sandbox/SOC/2007/visualization/libs/svg_plot/test/Jamfile.v2
==============================================================================
--- sandbox/SOC/2007/visualization/libs/svg_plot/test/Jamfile.v2 (original)
+++ sandbox/SOC/2007/visualization/libs/svg_plot/test/Jamfile.v2 2009-02-06 12:06:33 EST (Fri, 06 Feb 2009)
@@ -38,8 +38,8 @@
# Warning suppression:
<toolset>msvc:<cxxflags>/wd4996 # 'putenv': The POSIX name for this item is deprecated.
<toolset>msvc:<cxxflags>/wd4512 # assignment operator could not be generated.
- <toolset>msvc:<cxxflags>/wd4610 #
- <toolset>msvc:<cxxflags>/wd4510 #
+ <toolset>msvc:<cxxflags>/wd4610 #
+ <toolset>msvc:<cxxflags>/wd4510 #
<toolset>msvc:<cxxflags>/wd4224 # nonstandard extension used : formal parameter 'arg' was previously defined as a type.
<toolset>msvc:<cxxflags>/wd4127 # expression is constant.
<toolset>msvc:<cxxflags>/wd4701 # needed for lexical cast - temporary.
@@ -51,4 +51,5 @@
test-suite "SVG Plot"
: [ run 1d_tests.cpp ]
[ run 1d_color_consistency.cpp ]
+ [ run test_svg.cpp ]
;
Modified: sandbox/SOC/2007/visualization/libs/svg_plot/test/test_svg.cpp
==============================================================================
--- sandbox/SOC/2007/visualization/libs/svg_plot/test/test_svg.cpp (original)
+++ sandbox/SOC/2007/visualization/libs/svg_plot/test/test_svg.cpp 2009-02-06 12:06:33 EST (Fri, 06 Feb 2009)
@@ -16,7 +16,8 @@
//#if defined (BOOST_MSVC) // requires a prior Boost include, so use MSC_VER instead.
#if defined (_MSC_VER)
//# pragma warning(disable : 4267) // '=' : conversion from 'size_t' to 'unsigned int'
-
+# pragma warning(disable : 4996) // Deprecated.
+# pragma warning(disable : 4224) // nonstandard extension used : formal parameter 'arg' was previously defined as a type
# pragma warning(disable : 4310) // cast truncates constant value
# pragma warning(disable : 4512) // assignment operator could not be generated
//# pragma warning(disable : 4702) // unreachable code
@@ -63,8 +64,13 @@
BOOST_CHECK_EQUAL(svg_color(aliceblue), svg_color(240, 248, 255));
BOOST_CHECK_EQUAL(svg_color(red), svg_color(255, 0, 0));
BOOST_CHECK_EQUAL(svg_color(black), svg_color(0, 0, 0)); // default black.
- BOOST_CHECK_EQUAL(svg_color(blank), svg_color(0, 0, 0));
+ BOOST_CHECK_EQUAL(svg_color(blank), svg_color(255, 255, 255)); // blank is now white
BOOST_CHECK_NE(black, white);
+ BOOST_CHECK_NE(red, green);
+
+ BOOST_CHECK_EQUAL(black, black); //
+ BOOST_CHECK_EQUAL(white, white); //
+ BOOST_CHECK_EQUAL(svg_color(blank), svg_color(blank)); //
// Test operator==
@@ -113,7 +119,7 @@
plot_line_style my_plot_line(svg_color(black), false, false);
BOOST_CHECK_EQUAL(my_plot_line.color(), svg_color(black));
- BOOST_CHECK_EQUAL(my_plot_line.area_fill(), blank);
+ BOOST_CHECK_EQUAL(my_plot_line.area_fill(), svg_color(blank));
BOOST_CHECK_EQUAL(my_plot_line.line_on(), true);
BOOST_CHECK_EQUAL(my_plot_line.bezier_on(), false);
plot_line_style my_plot_line2(svg_color(red), true, true);
@@ -137,7 +143,7 @@
my_style.stroke_color(white); // change
BOOST_CHECK_EQUAL(my_style.stroke_color(), svg_color(white)); // & check.
- BOOST_CHECK_EQUAL(my_style.fill_color(), svg_color(black)); // default black.
+ BOOST_CHECK_EQUAL(my_style.fill_color(), svg_color(blank)); // default black.
my_style.fill_color(white); // change
BOOST_CHECK_EQUAL(my_style.fill_color(), svg_color(white)); // & check.
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