|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r53249 - sandbox/numeric_adaptor/libs/numeric_adaptor/test
From: bruno.lalande_at_[hidden]
Date: 2009-05-25 11:02:09
Author: bruno.lalande
Date: 2009-05-25 11:02:08 EDT (Mon, 25 May 2009)
New Revision: 53249
URL: http://svn.boost.org/trac/boost/changeset/53249
Log:
Renamed a test file.
Added:
sandbox/numeric_adaptor/libs/numeric_adaptor/test/test_conversions.cpp (contents, props changed)
- copied, changed from r53248, /sandbox/numeric_adaptor/libs/numeric_adaptor/test/test_cast.cpp
Removed:
sandbox/numeric_adaptor/libs/numeric_adaptor/test/test_cast.cpp
Text files modified:
sandbox/numeric_adaptor/libs/numeric_adaptor/test/Jamroot | 2 +-
sandbox/numeric_adaptor/libs/numeric_adaptor/test/test_conversions.cpp | 1 +
2 files changed, 2 insertions(+), 1 deletions(-)
Modified: sandbox/numeric_adaptor/libs/numeric_adaptor/test/Jamroot
==============================================================================
--- sandbox/numeric_adaptor/libs/numeric_adaptor/test/Jamroot (original)
+++ sandbox/numeric_adaptor/libs/numeric_adaptor/test/Jamroot 2009-05-25 11:02:08 EDT (Mon, 25 May 2009)
@@ -15,4 +15,4 @@
import testing ;
run test_heron.cpp : gmp ;
-run test_cast.cpp : gmp ;
+run test_conversions.cpp : gmp ;
Deleted: sandbox/numeric_adaptor/libs/numeric_adaptor/test/test_cast.cpp
==============================================================================
--- sandbox/numeric_adaptor/libs/numeric_adaptor/test/test_cast.cpp 2009-05-25 11:02:08 EDT (Mon, 25 May 2009)
+++ (empty file)
@@ -1,42 +0,0 @@
-// Numeric Adaptor Library testing suite
-//
-// Copyright Barend Gehrels 2009, Geodan Holding B.V. Amsterdam, the Netherlands.
-// Copyright Bruno Lalande 2009
-// Use, modification and distribution is subject to 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)
-
-
-#include <boost/test/included/test_exec_monitor.hpp>
-#include <boost/numeric_adaptor/numeric_adaptor.hpp>
-#include <boost/numeric_adaptor/ieee_policy.hpp>
-#ifndef NO_CLN
-#include <boost/numeric_adaptor/cln_policy.hpp>
-#endif
-#include <boost/numeric_adaptor/gmp_policy.hpp>
-
-
-template <typename Policy>
-void test_all()
-{
- typedef numeric_adaptor::numeric_adaptor<Policy> num;
-
- num n = 1234.5;
- BOOST_CHECK_EQUAL(int(n), 1234);
- BOOST_CHECK_EQUAL(float(n), 1234.5);
- BOOST_CHECK_EQUAL(double(n), 1234.5);
- BOOST_CHECK_EQUAL(n.template get<std::string>(), "1234.5");
-
- num n2 = "1234.5";
- BOOST_CHECK_EQUAL(double(n2), 1234.5);
-
- num n3("1234.5");
- BOOST_CHECK_EQUAL(double(n3), 1234.5);
-}
-
-int test_main(int, char*[])
-{
- test_all<numeric_adaptor::ieee_policy<double> >();
-
- return 0;
-};
Copied: sandbox/numeric_adaptor/libs/numeric_adaptor/test/test_conversions.cpp (from r53248, /sandbox/numeric_adaptor/libs/numeric_adaptor/test/test_cast.cpp)
==============================================================================
--- /sandbox/numeric_adaptor/libs/numeric_adaptor/test/test_cast.cpp (original)
+++ sandbox/numeric_adaptor/libs/numeric_adaptor/test/test_conversions.cpp 2009-05-25 11:02:08 EDT (Mon, 25 May 2009)
@@ -26,6 +26,7 @@
BOOST_CHECK_EQUAL(float(n), 1234.5);
BOOST_CHECK_EQUAL(double(n), 1234.5);
BOOST_CHECK_EQUAL(n.template get<std::string>(), "1234.5");
+ BOOST_CHECK_EQUAL(numeric_adaptor::get<std::string>(n), "1234.5");
num n2 = "1234.5";
BOOST_CHECK_EQUAL(double(n2), 1234.5);
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