|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r51189 - trunk/libs/units/test
From: steven_at_[hidden]
Date: 2009-02-10 16:47:43
Author: steven_watanabe
Date: 2009-02-10 16:47:42 EST (Tue, 10 Feb 2009)
New Revision: 51189
URL: http://svn.boost.org/trac/boost/changeset/51189
Log:
Begin tracing xlc failure
Text files modified:
trunk/libs/units/test/test_conversion.cpp | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
Modified: trunk/libs/units/test/test_conversion.cpp
==============================================================================
--- trunk/libs/units/test/test_conversion.cpp (original)
+++ trunk/libs/units/test/test_conversion.cpp 2009-02-10 16:47:42 EST (Tue, 10 Feb 2009)
@@ -85,6 +85,7 @@
}
BOOST_AUTO_TEST_CASE(test_dimensionless_conversions) {
+ typedef bu::divide_typeof_helper<bu::cgs::force, bu::si::force>::type mixed_dimensionless;
bu::quantity<bu::si::dimensionless> dimensionless_test1(1.0*bu::cgs::dyne/bu::si::newton);
BOOST_CHECK(dimensionless_test1 == 1e-5);
@@ -96,6 +97,10 @@
bu::quantity<bu::divide_typeof_helper<bu::cgs::force, bu::si::force>::type> dimensionless_test3(dimensionless_test2);
BOOST_UNITS_CHECK_CLOSE(dimensionless_test3.value(), 1.0);
+ BOOST_UNITS_CHECK_CLOSE(boost::units::conversion_factor(mixed_dimensionless(), heterogeneous_dimensionless()), 1e-5);
+ BOOST_UNITS_CHECK_CLOSE(boost::units::conversion_factor(heterogeneous_dimensionless(), mixed_dimensionless()), 1e5);
+
+
//m/cm -> g/kg
bu::quantity<bu::divide_typeof_helper<bu::si::length, bu::cgs::length>::type> dimensionless_test4(2.0 * bu::si::meters / bu::cgs::centimeters);
bu::quantity<bu::divide_typeof_helper<bu::cgs::mass, bu::si::mass>::type> dimensionless_test5(dimensionless_test4);
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