|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r50026 - trunk/libs/units/test
From: steven_at_[hidden]
Date: 2008-11-29 16:07:52
Author: steven_watanabe
Date: 2008-11-29 16:07:52 EST (Sat, 29 Nov 2008)
New Revision: 50026
URL: http://svn.boost.org/trac/boost/changeset/50026
Log:
Attempt to isolate sun-5.7/8 problems
Added:
trunk/libs/units/test/test_unscale.cpp (contents, props changed)
Text files modified:
trunk/libs/units/test/Jamfile.v2 | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
Modified: trunk/libs/units/test/Jamfile.v2
==============================================================================
--- trunk/libs/units/test/Jamfile.v2 (original)
+++ trunk/libs/units/test/Jamfile.v2 2008-11-29 16:07:52 EST (Sat, 29 Nov 2008)
@@ -22,6 +22,7 @@
compile test_mixed_value_types.cpp ;
compile test_complicated_system.cpp ;
compile test_reduce_unit.cpp ;
+compile test_unscale.cpp ;
run test_dimensionless_quantity.cpp ;
run test_implicit_conversion.cpp ;
Added: trunk/libs/units/test/test_unscale.cpp
==============================================================================
--- (empty file)
+++ trunk/libs/units/test/test_unscale.cpp 2008-11-29 16:07:52 EST (Sat, 29 Nov 2008)
@@ -0,0 +1,52 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2007-2008 Steven Watanabe
+//
+// 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)
+
+/**
+\file
+
+\brief test_unscale.cpp
+
+\detailed
+Test that unscale works in an attempt to isolate the sun problems.
+
+Output:
+@verbatim
+@endverbatim
+**/
+
+#include <boost/units/reduce_unit.hpp>
+#include <boost/units/detail/unscale.hpp>
+#include <boost/units/base_units/temperature/fahrenheit.hpp>
+
+#include <boost/mpl/assert.hpp>
+#include <boost/type_traits/is_same.hpp>
+
+BOOST_MPL_ASSERT((boost::is_same<boost::units::unscale<boost::units::reduce_unit<boost::units::temperature::fahrenheit_base_unit::unit_type>::type>::type,
+ boost::units::temperature::fahrenheit_base_unit::unit_type>));
+
+BOOST_MPL_ASSERT((boost::is_same<
+ boost::units::temperature::fahrenheit_base_unit::unit_type,
+ boost::units::unit<
+ boost::units::temperature_dimension,
+ boost::units::heterogeneous_system<
+ boost::units::heterogeneous_system_impl<
+ boost::units::list<
+ boost::units::heterogeneous_system_dim<
+ boost::units::temperature::fahrenheit_base_unit,
+ boost::units::static_rational<1>
+ >,
+ boost::units::dimensionless_type
+ >,
+ boost::units::temperature_dimension,
+ boost::units::dimensionless_type
+ >
+ >
+ >
+>));
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