Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r65624 - sandbox/chrono/libs/ratio/test
From: vicente.botet_at_[hidden]
Date: 2010-09-27 07:28:10


Author: viboes
Date: 2010-09-27 07:28:07 EDT (Mon, 27 Sep 2010)
New Revision: 65624
URL: http://svn.boost.org/trac/boost/changeset/65624

Log:
Ratio. Remove LLVM license
Removed:
   sandbox/chrono/libs/ratio/test/ratio_add_fail.cpp
   sandbox/chrono/libs/ratio/test/ratio_divide_fail.cpp
   sandbox/chrono/libs/ratio/test/ratio_fail_test1.cpp
   sandbox/chrono/libs/ratio/test/ratio_fail_test2.cpp
   sandbox/chrono/libs/ratio/test/ratio_fail_test3.cpp
   sandbox/chrono/libs/ratio/test/ratio_fail_test4.cpp
   sandbox/chrono/libs/ratio/test/ratio_multiply_fail.cpp
   sandbox/chrono/libs/ratio/test/ratio_ope_test.cpp
   sandbox/chrono/libs/ratio/test/ratio_substract_fail.cpp
Text files modified:
   sandbox/chrono/libs/ratio/test/Jamfile.v2 | 32 +----------------------
   sandbox/chrono/libs/ratio/test/ratio_test.cpp | 54 +++++++++++++--------------------------
   2 files changed, 20 insertions(+), 66 deletions(-)

Modified: sandbox/chrono/libs/ratio/test/Jamfile.v2
==============================================================================
--- sandbox/chrono/libs/ratio/test/Jamfile.v2 (original)
+++ sandbox/chrono/libs/ratio/test/Jamfile.v2 2010-09-27 07:28:07 EDT (Mon, 27 Sep 2010)
@@ -34,37 +34,9 @@
         <toolset>msvc:<cxxflags>/wd4127
     ;
 
- test-suite "ratio.ratio"
+ test-suite "ratio"
         :
- [ compile typedefs.pass.cpp ]
- [ compile ratio_ratio/ratio.pass.cpp ]
- [ compile-fail ratio_ratio/ratio1.fail.cpp ]
- [ compile-fail ratio_ratio/ratio2.fail.cpp ]
- [ compile-fail ratio_ratio/ratio3.fail.cpp ]
- ;
-
- test-suite "ratio.arithmetic"
- :
- #[ run ratio_ope_test.cpp ]
- [ compile-fail ratio_fail_test1.cpp ]
- [ compile ratio_arithmetic/ratio_add.pass.cpp ]
- [ compile ratio_arithmetic/ratio_subtract.pass.cpp ]
- [ compile ratio_arithmetic/ratio_multiply.pass.cpp ]
- [ compile ratio_arithmetic/ratio_divide.pass.cpp ]
- [ compile-fail ratio_arithmetic/ratio_add.fail.cpp ]
- [ compile-fail ratio_arithmetic/ratio_subtract.fail.cpp ]
- [ compile-fail ratio_arithmetic/ratio_multiply.fail.cpp ]
- [ compile-fail ratio_arithmetic/ratio_divide.fail.cpp ]
- ;
-
- test-suite "ratio.comparison"
- :
- [ compile ratio_comparison/ratio_equal.pass.cpp ]
- [ compile ratio_comparison/ratio_not_equal.pass.cpp ]
- [ compile ratio_comparison/ratio_less.pass.cpp ]
- [ compile ratio_comparison/ratio_less_equal.pass.cpp ]
- [ compile ratio_comparison/ratio_greater.pass.cpp ]
- [ compile ratio_comparison/ratio_greater_equal.pass.cpp ]
+ [ run ratio_test.cpp ]
         ;
 
     test-suite "examples"

Deleted: sandbox/chrono/libs/ratio/test/ratio_add_fail.cpp
==============================================================================
--- sandbox/chrono/libs/ratio/test/ratio_add_fail.cpp 2010-09-27 07:28:07 EDT (Mon, 27 Sep 2010)
+++ (empty file)
@@ -1,22 +0,0 @@
-// ratio_add_fail.cpp ----------------------------------------------------//
-
-// Copyright 2010 Vicente J. Botet Escriba
-
-// Distributed under the Boost Software License, Version 1.0.
-// See http://www.boost.org/LICENSE_1_0.txt
-
-// Taken from llvm/libcxx/test/utilities/ratio
-//===---------------------------- ratio_add_fail -----------------------------------===//
-//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-
-#include <boost/ratio.hpp>
-
-typedef boost::ratio<BOOST_INTMAX_C(0x7FFFFFFFFFFFFFFF), 1> R1;
-typedef boost::ratio<1, 1> R2;
-typedef boost::ratio_add<R1, R2>::type RT;

Deleted: sandbox/chrono/libs/ratio/test/ratio_divide_fail.cpp
==============================================================================
--- sandbox/chrono/libs/ratio/test/ratio_divide_fail.cpp 2010-09-27 07:28:07 EDT (Mon, 27 Sep 2010)
+++ (empty file)
@@ -1,22 +0,0 @@
-// ratio_divide_fail.cpp ----------------------------------------------------//
-
-// Copyright 2010 Vicente J. Botet Escriba
-
-// Distributed under the Boost Software License, Version 1.0.
-// See http://www.boost.org/LICENSE_1_0.txt
-
-// Taken from llvm/libcxx/test/utilities/ratio
-//===---------------------------- ratio_multiply.fail -----------------------------------===//
-//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-
-#include <boost/ratio.hpp>
-
-typedef boost::ratio<BOOST_INTMAX_C(0x7FFFFFFFFFFFFFFF), 1> R1;
-typedef boost::ratio<1,2> R2;
-typedef boost::ratio_divide<R1, R2>::type RT;

Deleted: sandbox/chrono/libs/ratio/test/ratio_fail_test1.cpp
==============================================================================
--- sandbox/chrono/libs/ratio/test/ratio_fail_test1.cpp 2010-09-27 07:28:07 EDT (Mon, 27 Sep 2010)
+++ (empty file)
@@ -1,12 +0,0 @@
-// ratio_fail_test1.cpp ----------------------------------------------------//
-
-// Copyright 2008 Beman Dawes
-
-// Distributed under the Boost Software License, Version 1.0.
-// See http://www.boost.org/LICENSE_1_0.txt
-
-#include <boost/ratio.hpp>
-
-typedef boost::ratio<BOOST_INTMAX_C(0x7FFFFFFFFFFFFFFF), BOOST_INTMAX_C(0x7FFFFFFFFFFFFFF0)> R1;
-typedef boost::ratio<BOOST_INTMAX_C(0x7FFFFFFFFFFFFFFE), BOOST_INTMAX_C(0x7FFFFFFFFFFFFFF0)> R2;
-typedef boost::ratio_multiply<R1, R2>::type RT;

Deleted: sandbox/chrono/libs/ratio/test/ratio_fail_test2.cpp
==============================================================================
--- sandbox/chrono/libs/ratio/test/ratio_fail_test2.cpp 2010-09-27 07:28:07 EDT (Mon, 27 Sep 2010)
+++ (empty file)
@@ -1,24 +0,0 @@
-// ratio_fail_test2.cpp ----------------------------------------------------//
-
-// Copyright 2010 Vicente J. Botet Escriba
-
-// Distributed under the Boost Software License, Version 1.0.
-// See http://www.boost.org/LICENSE_1_0.txt
-
-// Taken from llvm/libcxx/test/utilities/ratio
-//===---------------------------- ratio -----------------------------------===//
-//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-
-#include <boost/ratio.hpp>
-
-int main()
-{
- const boost::intmax_t t1 = boost::ratio<1, 0>::num;
- (void)t1;
-}

Deleted: sandbox/chrono/libs/ratio/test/ratio_fail_test3.cpp
==============================================================================
--- sandbox/chrono/libs/ratio/test/ratio_fail_test3.cpp 2010-09-27 07:28:07 EDT (Mon, 27 Sep 2010)
+++ (empty file)
@@ -1,24 +0,0 @@
-// ratio_fail_test3.cpp ----------------------------------------------------//
-
-// Copyright 2010 Vicente J. Botet Escriba
-
-// Distributed under the Boost Software License, Version 1.0.
-// See http://www.boost.org/LICENSE_1_0.txt
-
-// Taken from llvm/libcxx/test/utilities/ratio
-//===---------------------------- ratio -----------------------------------===//
-//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-
-
-#include <boost/ratio.hpp>
-int main()
-{
- const boost::intmax_t t1 = boost::ratio<0x8000000000000000ULL, 1>::num;
- (void)t1;
-}

Deleted: sandbox/chrono/libs/ratio/test/ratio_fail_test4.cpp
==============================================================================
--- sandbox/chrono/libs/ratio/test/ratio_fail_test4.cpp 2010-09-27 07:28:07 EDT (Mon, 27 Sep 2010)
+++ (empty file)
@@ -1,23 +0,0 @@
-// ratio_fail_test4.cpp ----------------------------------------------------//
-
-// Copyright 2010 Vicente J. Botet Escriba
-
-// Distributed under the Boost Software License, Version 1.0.
-// See http://www.boost.org/LICENSE_1_0.txt
-
-// Taken from llvm/libcxx/test/utilities/ratio
-//===---------------------------- ratio -----------------------------------===//
-//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-
-#include <boost/ratio.hpp>
-int main()
-{
- const boost::intmax_t t1 = boost::ratio<1, 0x8000000000000000ULL>::num;
- (void)t1;
-}

Deleted: sandbox/chrono/libs/ratio/test/ratio_multiply_fail.cpp
==============================================================================
--- sandbox/chrono/libs/ratio/test/ratio_multiply_fail.cpp 2010-09-27 07:28:07 EDT (Mon, 27 Sep 2010)
+++ (empty file)
@@ -1,22 +0,0 @@
-// ratio_multiply_fail.cpp ----------------------------------------------------//
-
-// Copyright 2010 Vicente J. Botet Escriba
-
-// Distributed under the Boost Software License, Version 1.0.
-// See http://www.boost.org/LICENSE_1_0.txt
-
-#include <boost/ratio.hpp>
-
-// Taken from llvm/libcxx/test/utilities/ratio
-//===---------------------------- ratio_multiply.fail -----------------------------------===//
-//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-
-typedef boost::ratio<BOOST_INTMAX_C(0x7FFFFFFFFFFFFFFF), 1> R1;
-typedef boost::ratio<2,1> R2;
-typedef boost::ratio_multiply<R1, R2>::type RT;

Deleted: sandbox/chrono/libs/ratio/test/ratio_ope_test.cpp
==============================================================================
--- sandbox/chrono/libs/ratio/test/ratio_ope_test.cpp 2010-09-27 07:28:07 EDT (Mon, 27 Sep 2010)
+++ (empty file)
@@ -1,68 +0,0 @@
-// ratio_test.cpp ----------------------------------------------------------//
-
-// Copyright 2008 Howard Hinnant
-// Copyright 2008 Beman Dawes
-// Copyright 2010 Vicente J. Botet Escriba
-
-// Distributed under the Boost Software License, Version 1.0.
-// See http://www.boost.org/LICENSE_1_0.txt
-
-// A lot of test are taken from llvm/libcxx/test/utilities/ratio
-//===---------------------------- ratio -----------------------------------===//
-//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-
-#include <boost/ratio.hpp>
-#include <iostream>
-
-#if !defined(BOOST_NO_STATIC_ASSERT)
-#define NOTHING ""
-#endif
-
-
-#ifndef BOOST_NO_STATIC_ASSERT
-#define BOOST_RATIO_STATIC_ASSERT(CND, MSG, TYPES) static_assert(CND,MSG)
-#elif defined(BOOST_RATIO_USES_STATIC_ASSERT)
-#include <boost/static_assert.hpp>
-#define BOOST_RATIO_STATIC_ASSERT(CND, MSG, TYPES) BOOST_STATIC_ASSERT(CND)
-#elif defined(BOOST_RATIO_USES_MPL_ASSERT)
-#include <boost/mpl/assert.hpp>
-#include <boost/mpl/bool.hpp>
-#define BOOST_RATIO_STATIC_ASSERT(CND, MSG, TYPES) \
- BOOST_MPL_ASSERT_MSG(boost::mpl::bool_< (CND) >::type::value, MSG, TYPES)
-#else
-//~ #elif defined(BOOST_RATIO_USES_ARRAY_ASSERT)
-#define BOOST_RATIO_CONCAT(A,B) A##B
-#define BOOST_RATIO_NAME(A,B) BOOST_RATIO_CONCAT(A,B)
-#define BOOST_RATIO_STATIC_ASSERT(CND, MSG, TYPES) static char BOOST_RATIO_NAME(__boost_ratio_test_,__LINE__)[(CND)?1:-1]
-//~ #define BOOST_RATIO_STATIC_ASSERT(CND, MSG, TYPES)
-#endif
-
-
-typedef boost::ratio<5, 3> five_thirds; // five_thirds::num == 5, five_thirds::den == 3
-typedef boost::ratio<25, 15> also_five_thirds; // also_five_thirds::num == 5, also_five_thirds::den == 3
-typedef boost::ratio_divide<five_thirds, also_five_thirds>::type one; // one::num == 1, one::den == 1
-
-
-typedef boost::ratio_multiply<boost::ratio<5>, boost::giga>::type _5giga; // _5giga::num == 5000000000, _5giga::den == 1
-typedef boost::ratio_multiply<boost::ratio<5>, boost::nano>::type _5nano; // _5nano::num == 1, _5nano::den == 200000000
-
-// Test the case described in library working group issue 948.
-
-typedef boost::ratio<BOOST_INTMAX_C(0x7FFFFFFFFFFFFFFF), BOOST_INTMAX_C(0x7FFFFFFFFFFFFFF0)> R1;
-typedef boost::ratio<8, 7> R2;
-typedef boost::ratio_multiply<R1, R2>::type RT;
-
-
-
-int main()
-{
-
-
- return 0;
-}

Deleted: sandbox/chrono/libs/ratio/test/ratio_substract_fail.cpp
==============================================================================
--- sandbox/chrono/libs/ratio/test/ratio_substract_fail.cpp 2010-09-27 07:28:07 EDT (Mon, 27 Sep 2010)
+++ (empty file)
@@ -1,22 +0,0 @@
-// ratio_substract_fail.cpp ----------------------------------------------------//
-
-// Copyright 2010 Vicente J. Botet Escriba
-
-// Distributed under the Boost Software License, Version 1.0.
-// See http://www.boost.org/LICENSE_1_0.txt
-
-// Taken from llvm/libcxx/test/utilities/ratio
-//===---------------------------- ratio_substract.fail -----------------------------------===//
-//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-
-#include <boost/ratio.hpp>
-
-typedef boost::ratio<BOOST_INTMAX_C(-0x7FFFFFFFFFFFFFFF), 1> R1;
-typedef boost::ratio<1,1> R2;
-typedef boost::ratio_substract<R1, R2>::type RT;

Modified: sandbox/chrono/libs/ratio/test/ratio_test.cpp
==============================================================================
--- sandbox/chrono/libs/ratio/test/ratio_test.cpp (original)
+++ sandbox/chrono/libs/ratio/test/ratio_test.cpp 2010-09-27 07:28:07 EDT (Mon, 27 Sep 2010)
@@ -2,54 +2,36 @@
 
 // Copyright 2008 Howard Hinnant
 // Copyright 2008 Beman Dawes
-// Copyright 2010 Vicente J. Botet Escriba
 
 // Distributed under the Boost Software License, Version 1.0.
 // See http://www.boost.org/LICENSE_1_0.txt
 
-// A lot of test are taken from llvm/libcxx/test/utilities/ratio
-//===---------------------------- ratio -----------------------------------===//
-//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
 #include <boost/ratio.hpp>
+#include <boost/chrono/duration.hpp>
 #include <iostream>
 
-#if !defined(BOOST_NO_STATIC_ASSERT)
-#define NOTHING ""
-#endif
-
-
-#ifndef BOOST_NO_STATIC_ASSERT
-#define BOOST_RATIO_STATIC_ASSERT(CND, MSG, TYPES) static_assert(CND,MSG)
-#elif defined(BOOST_RATIO_USES_STATIC_ASSERT)
-#include <boost/static_assert.hpp>
-#define BOOST_RATIO_STATIC_ASSERT(CND, MSG, TYPES) BOOST_STATIC_ASSERT(CND)
-#elif defined(BOOST_RATIO_USES_MPL_ASSERT)
-#include <boost/mpl/assert.hpp>
-#include <boost/mpl/bool.hpp>
-#define BOOST_RATIO_STATIC_ASSERT(CND, MSG, TYPES) \
- BOOST_MPL_ASSERT_MSG(boost::mpl::bool_< (CND) >::type::value, MSG, TYPES)
-#else
-//~ #elif defined(BOOST_RATIO_USES_ARRAY_ASSERT)
-#define BOOST_RATIO_CONCAT(A,B) A##B
-#define BOOST_RATIO_NAME(A,B) BOOST_RATIO_CONCAT(A,B)
-#define BOOST_RATIO_STATIC_ASSERT(CND, MSG, TYPES) static char BOOST_RATIO_NAME(__boost_ratio_test_,__LINE__)[(CND)?1:-1]
-//~ #define BOOST_RATIO_STATIC_ASSERT(CND, MSG, TYPES)
-#endif
+typedef boost::ratio<5, 3> five_thirds; // five_thirds::num == 5, five_thirds::den == 3
+typedef boost::ratio<25, 15> also_five_thirds; // also_five_thirds::num == 5, also_five_thirds::den == 3
+typedef boost::ratio_divide<five_thirds, also_five_thirds>::type one; // one::num == 1, one::den == 1
+
+
+typedef boost::ratio_multiply<boost::ratio<5>, boost::giga>::type _5giga; // _5giga::num == 5000000000, _5giga::den == 1
+typedef boost::ratio_multiply<boost::ratio<5>, boost::nano>::type _5nano; // _5nano::num == 1, _5nano::den == 200000000
+
+// Test the case described in library working group issue 948.
+
+typedef boost::ratio<BOOST_INTMAX_C(0x7FFFFFFFFFFFFFFF), BOOST_INTMAX_C(0x7FFFFFFFFFFFFFF0)> R1;
+typedef boost::ratio<8, 7> R2;
+typedef boost::ratio_multiply<R1, R2>::type RT;
+
+
 
 int main()
 {
-
     typedef boost::ratio<8, BOOST_INTMAX_C(0x7FFFFFFFD)> R1;
     typedef boost::ratio<3, BOOST_INTMAX_C(0x7FFFFFFFD)> R2;
     typedef boost::ratio_subtract<R1, R2>::type RS;
     std::cout << RS::num << '/' << RS::den << '\n';
-
-
+
   return 0;
-}
+}
\ No newline at end of file


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