Boost logo

Boost-Commit :

From: jakevoytko_at_[hidden]
Date: 2007-07-02 20:48:10


Author: jakevoytko
Date: 2007-07-02 20:48:09 EDT (Mon, 02 Jul 2007)
New Revision: 7343
URL: http://svn.boost.org/trac/boost/changeset/7343

Log:
Beginning of regression testing, 2D plots, get_* functions

Added:
   sandbox/SOC/2007/visualization/libs/svg_plot/test/Jamfile.v2
   sandbox/SOC/2007/visualization/libs/svg_plot/test/test_color_constant.cpp

Added: sandbox/SOC/2007/visualization/libs/svg_plot/test/Jamfile.v2
==============================================================================
--- (empty file)
+++ sandbox/SOC/2007/visualization/libs/svg_plot/test/Jamfile.v2 2007-07-02 20:48:09 EDT (Mon, 02 Jul 2007)
@@ -0,0 +1,14 @@
+# Copyright 2007 Stjepan Rajko.
+# Distributed under the Boost Software License, Version 1.0. (See
+# accompanying file LICENSE_1_0.txt or copy at
+# http://www.boost.org/LICENSE_1_0.txt)
+
+import testing ;
+
+project
+ : requirements
+ <include>../../..
+ ;
+
+run test_color_constant.cpp ;
+

Added: sandbox/SOC/2007/visualization/libs/svg_plot/test/test_color_constant.cpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2007/visualization/libs/svg_plot/test/test_color_constant.cpp 2007-07-02 20:48:09 EDT (Mon, 02 Jul 2007)
@@ -0,0 +1,163 @@
+#include <boost/test/included/test_exec_monitor.hpp>
+
+#include "svg_1d_plot.hpp"
+
+using namespace boost::unit_test;
+using namespace boost::svg;
+using namespace boost;
+
+int test_main(int, char* [])
+{
+ BOOST_CHECK(constant_to_rgb(aliceblue) == svg_color(240, 248, 255));
+ BOOST_CHECK(constant_to_rgb(antiquewhite) == svg_color(250, 235, 215));
+ BOOST_CHECK(constant_to_rgb(aqua) == svg_color( 0, 255, 255));
+ BOOST_CHECK(constant_to_rgb(aquamarine) == svg_color(127, 255, 212));
+ BOOST_CHECK(constant_to_rgb(azure) == svg_color(240, 255, 255));
+ BOOST_CHECK(constant_to_rgb(beige) == svg_color(245, 245, 220));
+ BOOST_CHECK(constant_to_rgb(bisque) == svg_color(255, 228, 196));
+ BOOST_CHECK(constant_to_rgb(black) == svg_color( 0, 0, 0));
+ BOOST_CHECK(constant_to_rgb(blanchedalmond) == svg_color(255, 235, 205));
+ BOOST_CHECK(constant_to_rgb(blue) == svg_color( 0, 0, 255));
+ BOOST_CHECK(constant_to_rgb(blueviolet) == svg_color(138, 43, 226));
+ BOOST_CHECK(constant_to_rgb(brown) == svg_color(165, 42, 42));
+ BOOST_CHECK(constant_to_rgb(burlywood) == svg_color(222, 184, 135));
+ BOOST_CHECK(constant_to_rgb(cadetblue) == svg_color( 95, 158, 160));
+ BOOST_CHECK(constant_to_rgb(chartreuse) == svg_color(127, 255, 0));
+ BOOST_CHECK(constant_to_rgb(chocolate) == svg_color(210, 105, 30));
+ BOOST_CHECK(constant_to_rgb(coral) == svg_color(255, 127, 80));
+ BOOST_CHECK(constant_to_rgb(cornflowerblue) == svg_color(100, 149, 237));
+ BOOST_CHECK(constant_to_rgb(cornsilk) == svg_color(255, 248, 220));
+ BOOST_CHECK(constant_to_rgb(crimson) == svg_color(220, 20, 60));
+ BOOST_CHECK(constant_to_rgb(cyan) == svg_color( 0, 255, 255));
+ BOOST_CHECK(constant_to_rgb(darkblue) == svg_color( 0, 0, 139));
+ BOOST_CHECK(constant_to_rgb(darkcyan) == svg_color( 0, 139, 139));
+ BOOST_CHECK(constant_to_rgb(darkgoldenrod) == svg_color(184, 134, 11));
+ BOOST_CHECK(constant_to_rgb(darkgray) == svg_color(169, 169, 169));
+ BOOST_CHECK(constant_to_rgb(darkgreen) == svg_color( 0, 100, 0));
+ BOOST_CHECK(constant_to_rgb(darkgrey) == svg_color(169, 169, 169));
+ BOOST_CHECK(constant_to_rgb(darkkhaki) == svg_color(189, 183, 107));
+ BOOST_CHECK(constant_to_rgb(darkmagenta) == svg_color(139, 0, 139));
+ BOOST_CHECK(constant_to_rgb(darkolivegreen) == svg_color( 85, 107, 47));
+ BOOST_CHECK(constant_to_rgb(darkorange) == svg_color(255, 140, 0));
+ BOOST_CHECK(constant_to_rgb(darkorchid) == svg_color(153, 50, 204));
+ BOOST_CHECK(constant_to_rgb(darkred) == svg_color(139, 0, 0));
+ BOOST_CHECK(constant_to_rgb(darksalmon) == svg_color(233, 150, 122));
+ BOOST_CHECK(constant_to_rgb(darkseagreen) == svg_color(143, 188, 143));
+ BOOST_CHECK(constant_to_rgb(darkslateblue) == svg_color( 72, 61, 139));
+ BOOST_CHECK(constant_to_rgb(darkslategray) == svg_color( 47, 79, 79));
+ BOOST_CHECK(constant_to_rgb(darkslategrey) == svg_color( 47, 79, 79));
+ BOOST_CHECK(constant_to_rgb(darkturquoise) == svg_color( 0, 206, 209));
+ BOOST_CHECK(constant_to_rgb(darkviolet) == svg_color(148, 0, 211));
+ BOOST_CHECK(constant_to_rgb(deeppink) == svg_color(255, 20, 147));
+ BOOST_CHECK(constant_to_rgb(deepskyblue) == svg_color( 0, 191, 255));
+ BOOST_CHECK(constant_to_rgb(dimgray) == svg_color(105, 105, 105));
+ BOOST_CHECK(constant_to_rgb(dimgrey) == svg_color(105, 105, 105));
+ BOOST_CHECK(constant_to_rgb(dodgerblue) == svg_color( 30, 144, 255));
+ BOOST_CHECK(constant_to_rgb(firebrick) == svg_color(178, 34, 34));
+ BOOST_CHECK(constant_to_rgb(floralwhite) == svg_color(255, 250, 240));
+ BOOST_CHECK(constant_to_rgb(forestgreen) == svg_color( 34, 139, 34));
+ BOOST_CHECK(constant_to_rgb(fuchsia) == svg_color(255, 0, 255));
+ BOOST_CHECK(constant_to_rgb(gainsboro) == svg_color(220, 220, 220));
+ BOOST_CHECK(constant_to_rgb(ghostwhite) == svg_color(248, 248, 255));
+ BOOST_CHECK(constant_to_rgb(gold) == svg_color(255, 215, 0));
+ BOOST_CHECK(constant_to_rgb(goldenrod) == svg_color(218, 165, 32));
+ BOOST_CHECK(constant_to_rgb(gray) == svg_color(128, 128, 128));
+ BOOST_CHECK(constant_to_rgb(grey) == svg_color(128, 128, 128));
+ BOOST_CHECK(constant_to_rgb(green) == svg_color( 0, 128, 0));
+ BOOST_CHECK(constant_to_rgb(greenyellow) == svg_color(173, 255, 47));
+ BOOST_CHECK(constant_to_rgb(honeydew) == svg_color(240, 255, 240));
+ BOOST_CHECK(constant_to_rgb(hotpink) == svg_color(255, 105, 180));
+ BOOST_CHECK(constant_to_rgb(indianred) == svg_color(205, 92, 92));
+ BOOST_CHECK(constant_to_rgb(indigo) == svg_color( 75, 0, 130));
+ BOOST_CHECK(constant_to_rgb(ivory) == svg_color(255, 255, 240));
+ BOOST_CHECK(constant_to_rgb(khaki) == svg_color(240, 230, 140));
+ BOOST_CHECK(constant_to_rgb(lavender) == svg_color(230, 230, 250));
+ BOOST_CHECK(constant_to_rgb(lavenderblush) == svg_color(255, 240, 245));
+ BOOST_CHECK(constant_to_rgb(lawngreen) == svg_color(124, 252, 0));
+ BOOST_CHECK(constant_to_rgb(lemonchiffon) == svg_color(255, 250, 205));
+ BOOST_CHECK(constant_to_rgb(lightblue) == svg_color(173, 216, 230));
+ BOOST_CHECK(constant_to_rgb(lightcoral) == svg_color(240, 128, 128));
+ BOOST_CHECK(constant_to_rgb(lightcyan) == svg_color(224, 255, 255));
+ BOOST_CHECK(constant_to_rgb(lightgoldenrodyellow) == svg_color(250, 250, 210));
+ BOOST_CHECK(constant_to_rgb(lightgray) == svg_color(211, 211, 211));
+ BOOST_CHECK(constant_to_rgb(lightgreen) == svg_color(144, 238, 144));
+ BOOST_CHECK(constant_to_rgb(lightgrey) == svg_color(211, 211, 211));
+ BOOST_CHECK(constant_to_rgb(lightpink) == svg_color(255, 182, 193));
+ BOOST_CHECK(constant_to_rgb(lightsalmon) == svg_color(255, 160, 122));
+ BOOST_CHECK(constant_to_rgb(lightseagreen) == svg_color( 32, 178, 170));
+ BOOST_CHECK(constant_to_rgb(lightskyblue) == svg_color(135, 206, 250));
+ BOOST_CHECK(constant_to_rgb(lightslategray) == svg_color(119, 136, 153));
+ BOOST_CHECK(constant_to_rgb(lightslategrey) == svg_color(119, 136, 153));
+ BOOST_CHECK(constant_to_rgb(lightsteelblue) == svg_color(176, 196, 222));
+ BOOST_CHECK(constant_to_rgb(lightyellow) == svg_color(255, 255, 224));
+ BOOST_CHECK(constant_to_rgb(lime) == svg_color( 0, 255, 0));
+ BOOST_CHECK(constant_to_rgb(limegreen) == svg_color( 50, 205, 50));
+ BOOST_CHECK(constant_to_rgb(linen) == svg_color(250, 240, 230));
+ BOOST_CHECK(constant_to_rgb(magenta) == svg_color(255, 0, 255));
+ BOOST_CHECK(constant_to_rgb(maroon) == svg_color(128, 0, 0));
+ BOOST_CHECK(constant_to_rgb(mediumaquamarine) == svg_color(102, 205, 170));
+ BOOST_CHECK(constant_to_rgb(mediumblue) == svg_color( 0, 0, 205));
+ BOOST_CHECK(constant_to_rgb(mediumorchid) == svg_color(186, 85, 211));
+ BOOST_CHECK(constant_to_rgb(mediumpurple) == svg_color(147, 112, 219));
+ BOOST_CHECK(constant_to_rgb(mediumseagreen) == svg_color( 60, 179, 113));
+ BOOST_CHECK(constant_to_rgb(mediumslateblue) == svg_color(123, 104, 238));
+ BOOST_CHECK(constant_to_rgb(mediumspringgreen) == svg_color( 0, 250, 154));
+ BOOST_CHECK(constant_to_rgb(mediumturquoise) == svg_color( 72, 209, 204));
+ BOOST_CHECK(constant_to_rgb(mediumvioletred) == svg_color(199, 21, 133));
+ BOOST_CHECK(constant_to_rgb(midnightblue) == svg_color( 25, 25, 112));
+ BOOST_CHECK(constant_to_rgb(mintcream) == svg_color(245, 255, 250));
+ BOOST_CHECK(constant_to_rgb(mistyrose) == svg_color(255, 228, 225));
+ BOOST_CHECK(constant_to_rgb(moccasin) == svg_color(255, 228, 181));
+ BOOST_CHECK(constant_to_rgb(navajowhite) == svg_color(255, 222, 173));
+ BOOST_CHECK(constant_to_rgb(navy) == svg_color( 0, 0, 128));
+ BOOST_CHECK(constant_to_rgb(oldlace) == svg_color(253, 245, 230));
+ BOOST_CHECK(constant_to_rgb(olive) == svg_color(128, 128, 0));
+ BOOST_CHECK(constant_to_rgb(olivedrab) == svg_color(107, 142, 35));
+ BOOST_CHECK(constant_to_rgb(orange) == svg_color(255, 165, 0));
+ BOOST_CHECK(constant_to_rgb(orangered) == svg_color(255, 69, 0));
+ BOOST_CHECK(constant_to_rgb(orchid) == svg_color(218, 112, 214));
+ BOOST_CHECK(constant_to_rgb(palegoldenrod) == svg_color(238, 232, 170));
+ BOOST_CHECK(constant_to_rgb(palegreen) == svg_color(152, 251, 152));
+ BOOST_CHECK(constant_to_rgb(paleturquoise) == svg_color(175, 238, 238));
+ BOOST_CHECK(constant_to_rgb(palevioletred) == svg_color(219, 112, 147));
+ BOOST_CHECK(constant_to_rgb(papayawhip) == svg_color(255, 239, 213));
+ BOOST_CHECK(constant_to_rgb(peachpuff) == svg_color(255, 218, 185));
+ BOOST_CHECK(constant_to_rgb(peru) == svg_color(205, 133, 63));
+ BOOST_CHECK(constant_to_rgb(pink) == svg_color(255, 192, 203));
+ BOOST_CHECK(constant_to_rgb(plum) == svg_color(221, 160, 221));
+ BOOST_CHECK(constant_to_rgb(powderblue) == svg_color(176, 224, 230));
+ BOOST_CHECK(constant_to_rgb(purple) == svg_color(128, 0, 128));
+ BOOST_CHECK(constant_to_rgb(red) == svg_color(255, 0, 0));
+ BOOST_CHECK(constant_to_rgb(rosybrown) == svg_color(188, 143, 143));
+ BOOST_CHECK(constant_to_rgb(royalblue) == svg_color( 65, 105, 225));
+ BOOST_CHECK(constant_to_rgb(saddlebrown) == svg_color(139, 69, 19));
+ BOOST_CHECK(constant_to_rgb(salmon) == svg_color(250, 128, 114));
+ BOOST_CHECK(constant_to_rgb(sandybrown) == svg_color(244, 164, 96));
+ BOOST_CHECK(constant_to_rgb(seagreen) == svg_color( 46, 139, 87));
+ BOOST_CHECK(constant_to_rgb(seashell) == svg_color(255, 245, 238));
+ BOOST_CHECK(constant_to_rgb(sienna) == svg_color(160, 82, 45));
+ BOOST_CHECK(constant_to_rgb(silver) == svg_color(192, 192, 192));
+ BOOST_CHECK(constant_to_rgb(skyblue) == svg_color(135, 206, 235));
+ BOOST_CHECK(constant_to_rgb(slateblue) == svg_color(106, 90, 205));
+ BOOST_CHECK(constant_to_rgb(slategray) == svg_color(112, 128, 144));
+ BOOST_CHECK(constant_to_rgb(slategrey) == svg_color(112, 128, 144));
+ BOOST_CHECK(constant_to_rgb(snow) == svg_color(255, 250, 250));
+ BOOST_CHECK(constant_to_rgb(springgreen) == svg_color( 0, 255, 127));
+ BOOST_CHECK(constant_to_rgb(steelblue) == svg_color( 70, 130, 180));
+
+ //need to specify boost::svg becuase tan is also a math function
+ BOOST_CHECK(constant_to_rgb(boost::svg::tan) == svg_color(210, 180, 140));
+
+ BOOST_CHECK(constant_to_rgb(teal) == svg_color( 0, 128, 128));
+ BOOST_CHECK(constant_to_rgb(thistle) == svg_color(216, 191, 216));
+ BOOST_CHECK(constant_to_rgb(tomato) == svg_color(255, 99, 71));
+ BOOST_CHECK(constant_to_rgb(turquoise) == svg_color( 64, 224, 208));
+ BOOST_CHECK(constant_to_rgb(violet) == svg_color(238, 130, 238));
+ BOOST_CHECK(constant_to_rgb(wheat) == svg_color(245, 222, 179));
+ BOOST_CHECK(constant_to_rgb(white) == svg_color(255, 255, 255));
+ BOOST_CHECK(constant_to_rgb(whitesmoke) == svg_color(245, 245, 245));
+ BOOST_CHECK(constant_to_rgb(yellow) == svg_color(255, 255, 0));
+ BOOST_CHECK(constant_to_rgb(yellowgreen) == svg_color(154, 205, 50));
+
+ return 0;
+}


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