Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r63751 - in sandbox/SOC/2010/bits_and_ints: boost/integer libs/integer/test
From: muriloufg_at_[hidden]
Date: 2010-07-08 12:14:55


Author: murilov
Date: 2010-07-08 12:14:54 EDT (Thu, 08 Jul 2010)
New Revision: 63751
URL: http://svn.boost.org/trac/boost/changeset/63751

Log:
Fixed lcm test
Text files modified:
   sandbox/SOC/2010/bits_and_ints/boost/integer/is_integral_constant.hpp | 2 +-
   sandbox/SOC/2010/bits_and_ints/boost/integer/static_gcd.hpp | 5 ++---
   sandbox/SOC/2010/bits_and_ints/boost/integer/static_lcm.hpp | 9 ++++-----
   sandbox/SOC/2010/bits_and_ints/libs/integer/test/static_lcm_test.cpp | 18 +++++++++---------
   4 files changed, 16 insertions(+), 18 deletions(-)

Modified: sandbox/SOC/2010/bits_and_ints/boost/integer/is_integral_constant.hpp
==============================================================================
--- sandbox/SOC/2010/bits_and_ints/boost/integer/is_integral_constant.hpp (original)
+++ sandbox/SOC/2010/bits_and_ints/boost/integer/is_integral_constant.hpp 2010-07-08 12:14:54 EDT (Thu, 08 Jul 2010)
@@ -35,7 +35,7 @@
 struct is_integral_constant : and_<
                 and_< has_tag<IC>, is_same<typename IC::tag, integral_c_tag> >,
                 and_< has_value_type<IC>, is_integral<typename IC::value_type> >,
- //has_value<IC>,
+ has_value<IC>,
                 has_type<IC>,
                 true_
>

Modified: sandbox/SOC/2010/bits_and_ints/boost/integer/static_gcd.hpp
==============================================================================
--- sandbox/SOC/2010/bits_and_ints/boost/integer/static_gcd.hpp (original)
+++ sandbox/SOC/2010/bits_and_ints/boost/integer/static_gcd.hpp 2010-07-08 12:14:54 EDT (Thu, 08 Jul 2010)
@@ -11,12 +11,11 @@
 #ifndef BOOST_STATIC_GCD_INCLUDED
 #define BOOST_STATIC_GCD_INCLUDED
 
+#include <boost/mpl/and.hpp>
 #include <boost/utility/enable_if.hpp>
+#include <boost/math/common_factor_ct.hpp>
 #include <boost/integer/static_abs.hpp>
 #include <boost/integer/is_integral_constant.hpp>
-#include <boost/mpl/and.hpp>
-#include <boost/mpl/integral_c.hpp>
-#include <boost/math/common_factor_ct.hpp>
 
 namespace boost {
         

Modified: sandbox/SOC/2010/bits_and_ints/boost/integer/static_lcm.hpp
==============================================================================
--- sandbox/SOC/2010/bits_and_ints/boost/integer/static_lcm.hpp (original)
+++ sandbox/SOC/2010/bits_and_ints/boost/integer/static_lcm.hpp 2010-07-08 12:14:54 EDT (Thu, 08 Jul 2010)
@@ -12,10 +12,9 @@
 #define BOOST_STATIC_LCM_INCLUDED
 
 #include <boost/utility/enable_if.hpp>
-#include <boost/integer/is_integral_constant.hpp>
-#include <boost/mpl/and.hpp>
-#include <boost/mpl/integral_c.hpp>
 #include <boost/math/common_factor_ct.hpp>
+#include <boost/integer/static_abs.hpp>
+#include <boost/integer/is_integral_constant.hpp>
 
 namespace boost {
 
@@ -36,8 +35,8 @@
>
 struct lcm : integral_c<uintmax_t,
         math::static_lcm<
- abs<ICT1>::value,
- abs<ICT2>::value
+ mpl::abs<ICT1>::value,
+ mpl::abs<ICT2>::value
>::value
>
 {};

Modified: sandbox/SOC/2010/bits_and_ints/libs/integer/test/static_lcm_test.cpp
==============================================================================
--- sandbox/SOC/2010/bits_and_ints/libs/integer/test/static_lcm_test.cpp (original)
+++ sandbox/SOC/2010/bits_and_ints/libs/integer/test/static_lcm_test.cpp 2010-07-08 12:14:54 EDT (Thu, 08 Jul 2010)
@@ -6,7 +6,7 @@
 // http://www.boost.org/LICENSE_1_0.txt
 
 #include <boost/detail/lightweight_test.hpp>
-#include <boost/integer/static_gcd.hpp>
+#include <boost/integer/static_lcm.hpp>
 #include <boost/mpl/integral_c.hpp>
 
 #include <iostream>
@@ -31,14 +31,14 @@
         typedef integral_c<int, 30> thirty;
         typedef integral_c<int, 49> fortynine;
         
- BOOST_TEST((static_lcm<one, one>::value) == 1);
- BOOST_TEST((static_lcm<zero, zero>::value) == 0);
- BOOST_TEST((static_lcm<six, zero>::value) == 0);
- BOOST_TEST((static_lcm<zero, seven>::value) == 0);
- BOOST_TEST((static_lcm<eighteen, thirty>::value) == 90);
- BOOST_TEST((static_lcm<three, seven>::value) == 21);
- BOOST_TEST((static_lcm<eight, nine>::value) == 72);
- BOOST_TEST((static_lcm<seven, fortynine>::value) == 49);
+ BOOST_TEST((lcm<one, one>::value) == 1);
+ BOOST_TEST((lcm<zero, zero>::value) == 0);
+ BOOST_TEST((lcm<six, zero>::value) == 0);
+ BOOST_TEST((lcm<zero, seven>::value) == 0);
+ BOOST_TEST((lcm<eighteen, thirty>::value) == 90);
+ BOOST_TEST((lcm<three, seven>::value) == 21);
+ BOOST_TEST((lcm<eight, nine>::value) == 72);
+ BOOST_TEST((lcm<seven, fortynine>::value) == 49);
         
         return boost::report_errors();
 }


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