Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r65849 - in sandbox/chrono/libs/chrono/test: . duration duration/arithmetic duration/cast duration/comparisons duration/cons duration/nonmember duration/observer duration/special
From: vicente.botet_at_[hidden]
Date: 2010-10-08 18:37:03


Author: viboes
Date: 2010-10-08 18:36:54 EDT (Fri, 08 Oct 2010)
New Revision: 65849
URL: http://svn.boost.org/trac/boost/changeset/65849

Log:
Chrono:
* Update duration tests
Removed:
   sandbox/chrono/libs/chrono/test/duration/observer/tested_elsewhere.pass.cpp
Text files modified:
   sandbox/chrono/libs/chrono/test/Jamfile.v2 | 4
   sandbox/chrono/libs/chrono/test/duration/arithmetic/op_divide_ass.pass.cpp | 20 ++------
   sandbox/chrono/libs/chrono/test/duration/arithmetic/op_minus.pass.cpp | 20 ++------
   sandbox/chrono/libs/chrono/test/duration/arithmetic/op_minus_ass.pass.cpp | 22 +++------
   sandbox/chrono/libs/chrono/test/duration/arithmetic/op_minusminus.pass.cpp | 21 +-------
   sandbox/chrono/libs/chrono/test/duration/arithmetic/op_minusminusint.pass.cpp | 22 +++------
   sandbox/chrono/libs/chrono/test/duration/arithmetic/op_mod_ass_duration.pass.cpp | 22 +++------
   sandbox/chrono/libs/chrono/test/duration/arithmetic/op_mod_ass_rep.pass.cpp | 20 ++------
   sandbox/chrono/libs/chrono/test/duration/arithmetic/op_plus.pass.cpp | 20 ++------
   sandbox/chrono/libs/chrono/test/duration/arithmetic/op_plus_ass.pass.cpp | 22 +++------
   sandbox/chrono/libs/chrono/test/duration/arithmetic/op_plusplus.pass.cpp | 22 +++------
   sandbox/chrono/libs/chrono/test/duration/arithmetic/op_plusplusint.pass.cpp | 22 +++------
   sandbox/chrono/libs/chrono/test/duration/arithmetic/op_times_ass.pass.cpp | 20 ++------
   sandbox/chrono/libs/chrono/test/duration/cast/duration_cast.pass.cpp | 24 +---------
   sandbox/chrono/libs/chrono/test/duration/cast/toduration.fail.cpp | 21 --------
   sandbox/chrono/libs/chrono/test/duration/comparisons/op_equal.pass.cpp | 51 +++++++----------------
   sandbox/chrono/libs/chrono/test/duration/comparisons/op_less.pass.cpp | 87 +++++++++++++--------------------------
   sandbox/chrono/libs/chrono/test/duration/cons/convert_exact.pass.cpp | 20 +-------
   sandbox/chrono/libs/chrono/test/duration/cons/convert_float_to_int.fail.cpp | 20 +-------
   sandbox/chrono/libs/chrono/test/duration/cons/convert_inexact.fail.cpp | 19 --------
   sandbox/chrono/libs/chrono/test/duration/cons/convert_inexact.pass.cpp | 20 +-------
   sandbox/chrono/libs/chrono/test/duration/cons/convert_int_to_float.pass.cpp | 21 --------
   sandbox/chrono/libs/chrono/test/duration/cons/default.pass.cpp | 19 +-------
   sandbox/chrono/libs/chrono/test/duration/cons/rep.pass.cpp | 20 +-------
   sandbox/chrono/libs/chrono/test/duration/cons/rep01.fail.cpp | 17 -------
   sandbox/chrono/libs/chrono/test/duration/cons/rep02.fail.cpp | 17 -------
   sandbox/chrono/libs/chrono/test/duration/cons/rep02.pass.cpp | 20 +-------
   sandbox/chrono/libs/chrono/test/duration/cons/rep03.fail.cpp | 19 -------
   sandbox/chrono/libs/chrono/test/duration/default_ratio.pass.cpp | 22 +--------
   sandbox/chrono/libs/chrono/test/duration/duration.fail.cpp | 14 -----
   sandbox/chrono/libs/chrono/test/duration/nonmember/op_divide_duration.pass.cpp | 27 ++---------
   sandbox/chrono/libs/chrono/test/duration/nonmember/op_divide_rep.fail.cpp | 18 -------
   sandbox/chrono/libs/chrono/test/duration/nonmember/op_divide_rep.pass.cpp | 21 +--------
   sandbox/chrono/libs/chrono/test/duration/nonmember/op_minus.pass.cpp | 21 --------
   sandbox/chrono/libs/chrono/test/duration/nonmember/op_mod_duration.pass.cpp | 25 ++---------
   sandbox/chrono/libs/chrono/test/duration/nonmember/op_mod_rep.fail.cpp | 18 -------
   sandbox/chrono/libs/chrono/test/duration/nonmember/op_mod_rep.pass.cpp | 19 -------
   sandbox/chrono/libs/chrono/test/duration/nonmember/op_plus.pass.cpp | 29 ++----------
   sandbox/chrono/libs/chrono/test/duration/nonmember/op_times_rep.pass.cpp | 27 +----------
   sandbox/chrono/libs/chrono/test/duration/nonmember/op_times_rep1.fail.cpp | 22 ---------
   sandbox/chrono/libs/chrono/test/duration/nonmember/op_times_rep2.fail.cpp | 22 ---------
   sandbox/chrono/libs/chrono/test/duration/positive_num.fail.cpp | 15 -----
   sandbox/chrono/libs/chrono/test/duration/ratio.fail.cpp | 23 ---------
   sandbox/chrono/libs/chrono/test/duration/special/max.pass.cpp | 20 +-------
   sandbox/chrono/libs/chrono/test/duration/special/min.pass.cpp | 20 +-------
   sandbox/chrono/libs/chrono/test/duration/special/zero.pass.cpp | 19 +-------
   sandbox/chrono/libs/chrono/test/duration/types.pass.cpp | 20 +-------
   47 files changed, 208 insertions(+), 846 deletions(-)

Modified: sandbox/chrono/libs/chrono/test/Jamfile.v2
==============================================================================
--- sandbox/chrono/libs/chrono/test/Jamfile.v2 (original)
+++ sandbox/chrono/libs/chrono/test/Jamfile.v2 2010-10-08 18:36:54 EDT (Fri, 08 Oct 2010)
@@ -127,8 +127,8 @@
         [ compile-fail duration/duration.fail.cpp ]
         [ compile-fail duration/ratio.fail.cpp ]
         [ compile-fail duration/positive_num.fail.cpp ]
- [ run duration/default_ratio.pass.cpp : : : <link>static ]
- [ run duration/types.pass.cpp : : : <link>static ]
+ [ compile duration/default_ratio.pass.cpp : : : ]
+ [ compile duration/types.pass.cpp : : : ]
         
         [ run duration/arithmetic/op_divide_ass.pass.cpp : : : <link>static ]
         [ run duration/arithmetic/op_minusminusint.pass.cpp : : : <link>static ]

Modified: sandbox/chrono/libs/chrono/test/duration/arithmetic/op_divide_ass.pass.cpp
==============================================================================
--- sandbox/chrono/libs/chrono/test/duration/arithmetic/op_divide_ass.pass.cpp (original)
+++ sandbox/chrono/libs/chrono/test/duration/arithmetic/op_divide_ass.pass.cpp 2010-10-08 18:36:54 EDT (Fri, 08 Oct 2010)
@@ -1,22 +1,14 @@
-//===----------------------------------------------------------------------===//
-//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-
-// duration
-
-// duration& operator/=(const rep& rhs);
+// 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/chrono.hpp>
-#include <cassert>
+#include <boost/detail/lightweight_test.hpp>
 
 int main()
 {
     boost::chrono::nanoseconds ns(15);
     ns /= 5;
- assert(ns.count() == 3);
+ BOOST_TEST(ns.count() == 3);
+ return boost::report_errors();
 }

Modified: sandbox/chrono/libs/chrono/test/duration/arithmetic/op_minus.pass.cpp
==============================================================================
--- sandbox/chrono/libs/chrono/test/duration/arithmetic/op_minus.pass.cpp (original)
+++ sandbox/chrono/libs/chrono/test/duration/arithmetic/op_minus.pass.cpp 2010-10-08 18:36:54 EDT (Fri, 08 Oct 2010)
@@ -1,22 +1,14 @@
-//===----------------------------------------------------------------------===//
-//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-
-// duration
-
-// duration operator-() const;
+// 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/chrono.hpp>
-#include <cassert>
+#include <boost/detail/lightweight_test.hpp>
 
 int main()
 {
     const boost::chrono::minutes m(3);
     boost::chrono::minutes m2 = -m;
- assert(m2.count() == -m.count());
+ BOOST_TEST(m2.count() == -m.count());
+ return boost::report_errors();
 }

Modified: sandbox/chrono/libs/chrono/test/duration/arithmetic/op_minus_ass.pass.cpp
==============================================================================
--- sandbox/chrono/libs/chrono/test/duration/arithmetic/op_minus_ass.pass.cpp (original)
+++ sandbox/chrono/libs/chrono/test/duration/arithmetic/op_minus_ass.pass.cpp 2010-10-08 18:36:54 EDT (Fri, 08 Oct 2010)
@@ -1,24 +1,16 @@
-//===----------------------------------------------------------------------===//
-//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-
-// duration
-
-// duration& operator-=(const duration& d);
+// 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/chrono.hpp>
-#include <cassert>
+#include <boost/detail/lightweight_test.hpp>
 
 int main()
 {
     boost::chrono::seconds s(3);
     s -= boost::chrono::seconds(2);
- assert(s.count() == 1);
+ BOOST_TEST(s.count() == 1);
     s -= boost::chrono::minutes(2);
- assert(s.count() == -119);
+ BOOST_TEST(s.count() == -119);
+ return boost::report_errors();
 }

Modified: sandbox/chrono/libs/chrono/test/duration/arithmetic/op_minusminus.pass.cpp
==============================================================================
--- sandbox/chrono/libs/chrono/test/duration/arithmetic/op_minusminus.pass.cpp (original)
+++ sandbox/chrono/libs/chrono/test/duration/arithmetic/op_minusminus.pass.cpp 2010-10-08 18:36:54 EDT (Fri, 08 Oct 2010)
@@ -2,27 +2,14 @@
 // Distributed under the Boost Software License, Version 1.0.
 // See http://www.boost.org/LICENSE_1_0.txt
 
-// Adapted from llvm/libcxx/test/utilities/chrono
-//===----------------------------------------------------------------------===//
-//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-
-// duration
-
-// duration& operator--();
-
 #include <boost/chrono.hpp>
-#include <cassert>
+#include <boost/detail/lightweight_test.hpp>
 
 int main()
 {
     boost::chrono::hours h(3);
     boost::chrono::hours& href = --h;
- assert(&href == &h);
- assert(h.count() == 2);
+ BOOST_TEST(&href == &h);
+ BOOST_TEST(h.count() == 2);
+ return boost::report_errors();
 }

Modified: sandbox/chrono/libs/chrono/test/duration/arithmetic/op_minusminusint.pass.cpp
==============================================================================
--- sandbox/chrono/libs/chrono/test/duration/arithmetic/op_minusminusint.pass.cpp (original)
+++ sandbox/chrono/libs/chrono/test/duration/arithmetic/op_minusminusint.pass.cpp 2010-10-08 18:36:54 EDT (Fri, 08 Oct 2010)
@@ -1,23 +1,15 @@
-//===----------------------------------------------------------------------===//
-//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-
-// duration
-
-// duration operator--(int);
+// 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/chrono.hpp>
-#include <cassert>
+#include <boost/detail/lightweight_test.hpp>
 
 int main()
 {
     boost::chrono::hours h(3);
     boost::chrono::hours h2 = h--;
- assert(h.count() == 2);
- assert(h2.count() == 3);
+ BOOST_TEST(h.count() == 2);
+ BOOST_TEST(h2.count() == 3);
+ return boost::report_errors();
 }

Modified: sandbox/chrono/libs/chrono/test/duration/arithmetic/op_mod_ass_duration.pass.cpp
==============================================================================
--- sandbox/chrono/libs/chrono/test/duration/arithmetic/op_mod_ass_duration.pass.cpp (original)
+++ sandbox/chrono/libs/chrono/test/duration/arithmetic/op_mod_ass_duration.pass.cpp 2010-10-08 18:36:54 EDT (Fri, 08 Oct 2010)
@@ -1,25 +1,17 @@
-//===----------------------------------------------------------------------===//
-//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-
-// duration
-
-// duration& operator%=(const duration& rhs)
+// 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/chrono.hpp>
-#include <cassert>
+#include <boost/detail/lightweight_test.hpp>
 
 int main()
 {
     boost::chrono::microseconds us(11);
     boost::chrono::microseconds us2(3);
     us %= us2;
- assert(us.count() == 2);
+ BOOST_TEST(us.count() == 2);
     us %= boost::chrono::milliseconds(3);
- assert(us.count() == 2);
+ BOOST_TEST(us.count() == 2);
+ return boost::report_errors();
 }

Modified: sandbox/chrono/libs/chrono/test/duration/arithmetic/op_mod_ass_rep.pass.cpp
==============================================================================
--- sandbox/chrono/libs/chrono/test/duration/arithmetic/op_mod_ass_rep.pass.cpp (original)
+++ sandbox/chrono/libs/chrono/test/duration/arithmetic/op_mod_ass_rep.pass.cpp 2010-10-08 18:36:54 EDT (Fri, 08 Oct 2010)
@@ -1,22 +1,14 @@
-//===----------------------------------------------------------------------===//
-//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-
-// duration
-
-// duration& operator%=(const rep& rhs)
+// 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/chrono.hpp>
-#include <cassert>
+#include <boost/detail/lightweight_test.hpp>
 
 int main()
 {
     boost::chrono::microseconds us(11);
     us %= 3;
- assert(us.count() == 2);
+ BOOST_TEST(us.count() == 2);
+ return boost::report_errors();
 }

Modified: sandbox/chrono/libs/chrono/test/duration/arithmetic/op_plus.pass.cpp
==============================================================================
--- sandbox/chrono/libs/chrono/test/duration/arithmetic/op_plus.pass.cpp (original)
+++ sandbox/chrono/libs/chrono/test/duration/arithmetic/op_plus.pass.cpp 2010-10-08 18:36:54 EDT (Fri, 08 Oct 2010)
@@ -1,22 +1,14 @@
-//===----------------------------------------------------------------------===//
-//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-
-// duration
-
-// duration operator+() const;
+// 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/chrono.hpp>
-#include <cassert>
+#include <boost/detail/lightweight_test.hpp>
 
 int main()
 {
     const boost::chrono::minutes m(3);
     boost::chrono::minutes m2 = +m;
- assert(m.count() == m2.count());
+ BOOST_TEST(m.count() == m2.count());
+ return boost::report_errors();
 }

Modified: sandbox/chrono/libs/chrono/test/duration/arithmetic/op_plus_ass.pass.cpp
==============================================================================
--- sandbox/chrono/libs/chrono/test/duration/arithmetic/op_plus_ass.pass.cpp (original)
+++ sandbox/chrono/libs/chrono/test/duration/arithmetic/op_plus_ass.pass.cpp 2010-10-08 18:36:54 EDT (Fri, 08 Oct 2010)
@@ -1,24 +1,16 @@
-//===----------------------------------------------------------------------===//
-//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-
-// duration
-
-// duration& operator+=(const duration& d);
+// 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/chrono.hpp>
-#include <cassert>
+#include <boost/detail/lightweight_test.hpp>
 
 int main()
 {
     boost::chrono::seconds s(3);
     s += boost::chrono::seconds(2);
- assert(s.count() == 5);
+ BOOST_TEST(s.count() == 5);
     s += boost::chrono::minutes(2);
- assert(s.count() == 125);
+ BOOST_TEST(s.count() == 125);
+ return boost::report_errors();
 }

Modified: sandbox/chrono/libs/chrono/test/duration/arithmetic/op_plusplus.pass.cpp
==============================================================================
--- sandbox/chrono/libs/chrono/test/duration/arithmetic/op_plusplus.pass.cpp (original)
+++ sandbox/chrono/libs/chrono/test/duration/arithmetic/op_plusplus.pass.cpp 2010-10-08 18:36:54 EDT (Fri, 08 Oct 2010)
@@ -1,23 +1,15 @@
-//===----------------------------------------------------------------------===//
-//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-
-// duration
-
-// duration& operator++();
+// 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/chrono.hpp>
-#include <cassert>
+#include <boost/detail/lightweight_test.hpp>
 
 int main()
 {
     boost::chrono::hours h(3);
     boost::chrono::hours& href = ++h;
- assert(&href == &h);
- assert(h.count() == 4);
+ BOOST_TEST(&href == &h);
+ BOOST_TEST(h.count() == 4);
+ return boost::report_errors();
 }

Modified: sandbox/chrono/libs/chrono/test/duration/arithmetic/op_plusplusint.pass.cpp
==============================================================================
--- sandbox/chrono/libs/chrono/test/duration/arithmetic/op_plusplusint.pass.cpp (original)
+++ sandbox/chrono/libs/chrono/test/duration/arithmetic/op_plusplusint.pass.cpp 2010-10-08 18:36:54 EDT (Fri, 08 Oct 2010)
@@ -1,23 +1,15 @@
-//===----------------------------------------------------------------------===//
-//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-
-// duration
-
-// duration operator++(int);
+// 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/chrono.hpp>
-#include <cassert>
+#include <boost/detail/lightweight_test.hpp>
 
 int main()
 {
     boost::chrono::hours h(3);
     boost::chrono::hours h2 = h++;
- assert(h.count() == 4);
- assert(h2.count() == 3);
+ BOOST_TEST(h.count() == 4);
+ BOOST_TEST(h2.count() == 3);
+ return boost::report_errors();
 }

Modified: sandbox/chrono/libs/chrono/test/duration/arithmetic/op_times_ass.pass.cpp
==============================================================================
--- sandbox/chrono/libs/chrono/test/duration/arithmetic/op_times_ass.pass.cpp (original)
+++ sandbox/chrono/libs/chrono/test/duration/arithmetic/op_times_ass.pass.cpp 2010-10-08 18:36:54 EDT (Fri, 08 Oct 2010)
@@ -1,22 +1,14 @@
-//===----------------------------------------------------------------------===//
-//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-
-// duration
-
-// duration& operator*=(const rep& rhs);
+// 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/chrono.hpp>
-#include <cassert>
+#include <boost/detail/lightweight_test.hpp>
 
 int main()
 {
     boost::chrono::nanoseconds ns(3);
     ns *= 5;
- assert(ns.count() == 15);
+ BOOST_TEST(ns.count() == 15);
+ return boost::report_errors();
 }

Modified: sandbox/chrono/libs/chrono/test/duration/cast/duration_cast.pass.cpp
==============================================================================
--- sandbox/chrono/libs/chrono/test/duration/cast/duration_cast.pass.cpp (original)
+++ sandbox/chrono/libs/chrono/test/duration/cast/duration_cast.pass.cpp 2010-10-08 18:36:54 EDT (Fri, 08 Oct 2010)
@@ -2,27 +2,9 @@
 // Distributed under the Boost Software License, Version 1.0.
 // See http://www.boost.org/LICENSE_1_0.txt
 
-// Adapted from llvm/libcxx/test/utilities/chrono
-//===----------------------------------------------------------------------===//
-//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-
-// <chrono>
-
-// duration
-
-// template <class ToDuration, class Rep, class Period>
-// ToDuration
-// duration_cast(const duration<Rep, Period>& d);
-
 #include <boost/chrono.hpp>
 #include <boost/type_traits.hpp>
-#include <cassert>
+#include <boost/detail/lightweight_test.hpp>
 #if !defined(BOOST_NO_STATIC_ASSERT)
 #define NOTHING ""
 #endif
@@ -37,7 +19,7 @@
     typedef decltype(boost::chrono::duration_cast<ToDuration>(f)) R;
 #endif
     BOOST_CHRONO_STATIC_ASSERT((boost::is_same<R, ToDuration>::value), NOTHING, ());
- assert(boost::chrono::duration_cast<ToDuration>(f) == d);
+ BOOST_TEST(boost::chrono::duration_cast<ToDuration>(f) == d);
 }
 
 int main()
@@ -52,5 +34,5 @@
          boost::chrono::duration<double, boost::ratio<3600> >(7265./3600));
     test(boost::chrono::duration<int, boost::ratio<2, 3> >(9),
          boost::chrono::duration<int, boost::ratio<3, 5> >(10));
- return 0;
+ return boost::report_errors();
 }

Modified: sandbox/chrono/libs/chrono/test/duration/cast/toduration.fail.cpp
==============================================================================
--- sandbox/chrono/libs/chrono/test/duration/cast/toduration.fail.cpp (original)
+++ sandbox/chrono/libs/chrono/test/duration/cast/toduration.fail.cpp 2010-10-08 18:36:54 EDT (Fri, 08 Oct 2010)
@@ -2,28 +2,11 @@
 // Distributed under the Boost Software License, Version 1.0.
 // See http://www.boost.org/LICENSE_1_0.txt
 
-// Adapted from llvm/libcxx/test/utilities/chrono
-//===----------------------------------------------------------------------===//
-//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-
-// duration
-
-// template <class ToDuration, class Rep, class Period>
-// ToDuration
-// duration_cast(const duration<Rep, Period>& d);
-
-// ToDuration shall be an instantiation of duration.
+// ToDuration must be an instantiation of duration.
 
 #include <boost/chrono.hpp>
 
-int main()
+void test()
 {
     boost::chrono::duration_cast<int>(boost::chrono::milliseconds(3));
- return 0;
 }

Modified: sandbox/chrono/libs/chrono/test/duration/comparisons/op_equal.pass.cpp
==============================================================================
--- sandbox/chrono/libs/chrono/test/duration/comparisons/op_equal.pass.cpp (original)
+++ sandbox/chrono/libs/chrono/test/duration/comparisons/op_equal.pass.cpp 2010-10-08 18:36:54 EDT (Fri, 08 Oct 2010)
@@ -2,71 +2,52 @@
 // Distributed under the Boost Software License, Version 1.0.
 // See http://www.boost.org/LICENSE_1_0.txt
 
-// Adapted from llvm/libcxx/test/utilities/chrono
-//===----------------------------------------------------------------------===//
-//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-
-// duration
-
-// template <class Rep1, class Period1, class Rep2, class Period2>
-// bool
-// operator==(const duration<Rep1, Period1>& lhs, const duration<Rep2, Period2>& rhs);
-
-// template <class Rep1, class Period1, class Rep2, class Period2>
-// bool
-// operator!=(const duration<Rep1, Period1>& lhs, const duration<Rep2, Period2>& rhs);
-
 #include <boost/chrono.hpp>
-#include <cassert>
+#include <boost/detail/lightweight_test.hpp>
 
 int main()
 {
     {
     boost::chrono::seconds s1(3);
     boost::chrono::seconds s2(3);
- assert(s1 == s2);
- assert(!(s1 != s2));
+ BOOST_TEST(s1 == s2);
+ BOOST_TEST(!(s1 != s2));
     }
     {
     boost::chrono::seconds s1(3);
     boost::chrono::seconds s2(4);
- assert(!(s1 == s2));
- assert(s1 != s2);
+ BOOST_TEST(!(s1 == s2));
+ BOOST_TEST(s1 != s2);
     }
     {
     boost::chrono::milliseconds s1(3);
     boost::chrono::microseconds s2(3000);
- assert(s1 == s2);
- assert(!(s1 != s2));
+ BOOST_TEST(s1 == s2);
+ BOOST_TEST(!(s1 != s2));
     }
     {
     boost::chrono::milliseconds s1(3);
     boost::chrono::microseconds s2(4000);
- assert(!(s1 == s2));
- assert(s1 != s2);
+ BOOST_TEST(!(s1 == s2));
+ BOOST_TEST(s1 != s2);
     }
     {
     boost::chrono::duration<int, boost::ratio<2, 3> > s1(9);
     boost::chrono::duration<int, boost::ratio<3, 5> > s2(10);
- assert(s1 == s2);
- assert(!(s1 != s2));
+ BOOST_TEST(s1 == s2);
+ BOOST_TEST(!(s1 != s2));
     }
     {
     boost::chrono::duration<int, boost::ratio<2, 3> > s1(10);
     boost::chrono::duration<int, boost::ratio<3, 5> > s2(9);
- assert(!(s1 == s2));
- assert(s1 != s2);
+ BOOST_TEST(!(s1 == s2));
+ BOOST_TEST(s1 != s2);
     }
     {
     boost::chrono::duration<int, boost::ratio<2, 3> > s1(9);
     boost::chrono::duration<double, boost::ratio<3, 5> > s2(10);
- assert(s1 == s2);
- assert(!(s1 != s2));
+ BOOST_TEST(s1 == s2);
+ BOOST_TEST(!(s1 != s2));
     }
+ return boost::report_errors();
 }

Modified: sandbox/chrono/libs/chrono/test/duration/comparisons/op_less.pass.cpp
==============================================================================
--- sandbox/chrono/libs/chrono/test/duration/comparisons/op_less.pass.cpp (original)
+++ sandbox/chrono/libs/chrono/test/duration/comparisons/op_less.pass.cpp 2010-10-08 18:36:54 EDT (Fri, 08 Oct 2010)
@@ -2,93 +2,66 @@
 // Distributed under the Boost Software License, Version 1.0.
 // See http://www.boost.org/LICENSE_1_0.txt
 
-// Adapted from llvm/libcxx/test/utilities/chrono
-//===----------------------------------------------------------------------===//
-//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-
-// duration
-
-// template <class Rep1, class Period1, class Rep2, class Period2>
-// bool
-// operator< (const duration<Rep1, Period1>& lhs, const duration<Rep2, Period2>& rhs);
-
-// template <class Rep1, class Period1, class Rep2, class Period2>
-// bool
-// operator> (const duration<Rep1, Period1>& lhs, const duration<Rep2, Period2>& rhs);
-
-// template <class Rep1, class Period1, class Rep2, class Period2>
-// bool
-// operator<=(const duration<Rep1, Period1>& lhs, const duration<Rep2, Period2>& rhs);
-
-// template <class Rep1, class Period1, class Rep2, class Period2>
-// bool
-// operator>=(const duration<Rep1, Period1>& lhs, const duration<Rep2, Period2>& rhs);
-
 #include <boost/chrono.hpp>
-#include <cassert>
+#include <boost/detail/lightweight_test.hpp>
 
 int main()
 {
     {
     boost::chrono::seconds s1(3);
     boost::chrono::seconds s2(3);
- assert(!(s1 < s2));
- assert(!(s1 > s2));
- assert( (s1 <= s2));
- assert( (s1 >= s2));
+ BOOST_TEST(!(s1 < s2));
+ BOOST_TEST(!(s1 > s2));
+ BOOST_TEST( (s1 <= s2));
+ BOOST_TEST( (s1 >= s2));
     }
     {
     boost::chrono::seconds s1(3);
     boost::chrono::seconds s2(4);
- assert( (s1 < s2));
- assert(!(s1 > s2));
- assert( (s1 <= s2));
- assert(!(s1 >= s2));
+ BOOST_TEST( (s1 < s2));
+ BOOST_TEST(!(s1 > s2));
+ BOOST_TEST( (s1 <= s2));
+ BOOST_TEST(!(s1 >= s2));
     }
     {
     boost::chrono::milliseconds s1(3);
     boost::chrono::microseconds s2(3000);
- assert(!(s1 < s2));
- assert(!(s1 > s2));
- assert( (s1 <= s2));
- assert( (s1 >= s2));
+ BOOST_TEST(!(s1 < s2));
+ BOOST_TEST(!(s1 > s2));
+ BOOST_TEST( (s1 <= s2));
+ BOOST_TEST( (s1 >= s2));
     }
     {
     boost::chrono::milliseconds s1(3);
     boost::chrono::microseconds s2(4000);
- assert( (s1 < s2));
- assert(!(s1 > s2));
- assert( (s1 <= s2));
- assert(!(s1 >= s2));
+ BOOST_TEST( (s1 < s2));
+ BOOST_TEST(!(s1 > s2));
+ BOOST_TEST( (s1 <= s2));
+ BOOST_TEST(!(s1 >= s2));
     }
     {
     boost::chrono::duration<int, boost::ratio<2, 3> > s1(9);
     boost::chrono::duration<int, boost::ratio<3, 5> > s2(10);
- assert(!(s1 < s2));
- assert(!(s1 > s2));
- assert( (s1 <= s2));
- assert( (s1 >= s2));
+ BOOST_TEST(!(s1 < s2));
+ BOOST_TEST(!(s1 > s2));
+ BOOST_TEST( (s1 <= s2));
+ BOOST_TEST( (s1 >= s2));
     }
     {
     boost::chrono::duration<int, boost::ratio<2, 3> > s1(10);
     boost::chrono::duration<int, boost::ratio<3, 5> > s2(9);
- assert(!(s1 < s2));
- assert( (s1 > s2));
- assert(!(s1 <= s2));
- assert( (s1 >= s2));
+ BOOST_TEST(!(s1 < s2));
+ BOOST_TEST( (s1 > s2));
+ BOOST_TEST(!(s1 <= s2));
+ BOOST_TEST( (s1 >= s2));
     }
     {
     boost::chrono::duration<int, boost::ratio<2, 3> > s1(9);
     boost::chrono::duration<double, boost::ratio<3, 5> > s2(10);
- assert(!(s1 < s2));
- assert(!(s1 > s2));
- assert( (s1 <= s2));
- assert( (s1 >= s2));
+ BOOST_TEST(!(s1 < s2));
+ BOOST_TEST(!(s1 > s2));
+ BOOST_TEST( (s1 <= s2));
+ BOOST_TEST( (s1 >= s2));
     }
+ return boost::report_errors();
 }

Modified: sandbox/chrono/libs/chrono/test/duration/cons/convert_exact.pass.cpp
==============================================================================
--- sandbox/chrono/libs/chrono/test/duration/cons/convert_exact.pass.cpp (original)
+++ sandbox/chrono/libs/chrono/test/duration/cons/convert_exact.pass.cpp 2010-10-08 18:36:54 EDT (Fri, 08 Oct 2010)
@@ -2,29 +2,15 @@
 // Distributed under the Boost Software License, Version 1.0.
 // See http://www.boost.org/LICENSE_1_0.txt
 
-// Adapted from llvm/libcxx/test/utilities/chrono
-//===----------------------------------------------------------------------===//
-//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-
-// duration
-
-// template <class Rep2, class Period2>
-// duration(const duration<Rep2, Period2>& d);
-
 // exact conversions allowed for integral reps
 
 #include <boost/chrono.hpp>
-#include <cassert>
+#include <boost/detail/lightweight_test.hpp>
 
 int main()
 {
     boost::chrono::milliseconds ms(1);
     boost::chrono::microseconds us = ms;
- assert(us.count() == 1000);
+ BOOST_TEST(us.count() == 1000);
+ return boost::report_errors();
 }

Modified: sandbox/chrono/libs/chrono/test/duration/cons/convert_float_to_int.fail.cpp
==============================================================================
--- sandbox/chrono/libs/chrono/test/duration/cons/convert_float_to_int.fail.cpp (original)
+++ sandbox/chrono/libs/chrono/test/duration/cons/convert_float_to_int.fail.cpp 2010-10-08 18:36:54 EDT (Fri, 08 Oct 2010)
@@ -1,24 +1,12 @@
-//===----------------------------------------------------------------------===//
-//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-
-// <chrono>
-
-// duration
-
-// template <class Rep2, class Period2>
-// duration(const duration<Rep2, Period2>& d);
+// Copyright 2010 Vicente J. Botet Escriba
+// Distributed under the Boost Software License, Version 1.0.
+// See http://www.boost.org/LICENSE_1_0.txt
 
 // conversions from floating point to integral durations disallowed
 
 #include <boost/chrono.hpp>
 
-int main()
+void test()
 {
     boost::chrono::duration<double> d;
     boost::chrono::duration<int> i = d;

Modified: sandbox/chrono/libs/chrono/test/duration/cons/convert_inexact.fail.cpp
==============================================================================
--- sandbox/chrono/libs/chrono/test/duration/cons/convert_inexact.fail.cpp (original)
+++ sandbox/chrono/libs/chrono/test/duration/cons/convert_inexact.fail.cpp 2010-10-08 18:36:54 EDT (Fri, 08 Oct 2010)
@@ -2,28 +2,11 @@
 // Distributed under the Boost Software License, Version 1.0.
 // See http://www.boost.org/LICENSE_1_0.txt
 
-// Adapted from llvm/libcxx/test/utilities/chrono
-//===----------------------------------------------------------------------===//
-//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-
-// <chrono>
-
-// duration
-
-// template <class Rep2, class Period2>
-// duration(const duration<Rep2, Period2>& d);
-
 // inexact conversions disallowed for integral reps
 
 #include <boost/chrono.hpp>
 
-int main()
+void test()
 {
     boost::chrono::microseconds us(1);
     boost::chrono::milliseconds ms = us;

Modified: sandbox/chrono/libs/chrono/test/duration/cons/convert_inexact.pass.cpp
==============================================================================
--- sandbox/chrono/libs/chrono/test/duration/cons/convert_inexact.pass.cpp (original)
+++ sandbox/chrono/libs/chrono/test/duration/cons/convert_inexact.pass.cpp 2010-10-08 18:36:54 EDT (Fri, 08 Oct 2010)
@@ -2,29 +2,15 @@
 // Distributed under the Boost Software License, Version 1.0.
 // See http://www.boost.org/LICENSE_1_0.txt
 
-// Adapted from llvm/libcxx/test/utilities/chrono
-//===----------------------------------------------------------------------===//
-//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-
-// duration
-
-// template <class Rep2, class Period2>
-// duration(const duration<Rep2, Period2>& d);
-
 // inexact conversions allowed for floating point reps
 
 #include <boost/chrono.hpp>
-#include <cassert>
+#include <boost/detail/lightweight_test.hpp>
 
 int main()
 {
     boost::chrono::duration<double, boost::micro> us(1);
     boost::chrono::duration<double, boost::milli> ms = us;
- assert(ms.count() == 1./1000);
+ BOOST_TEST(ms.count() == 1./1000);
+ return boost::report_errors();
 }

Modified: sandbox/chrono/libs/chrono/test/duration/cons/convert_int_to_float.pass.cpp
==============================================================================
--- sandbox/chrono/libs/chrono/test/duration/cons/convert_int_to_float.pass.cpp (original)
+++ sandbox/chrono/libs/chrono/test/duration/cons/convert_int_to_float.pass.cpp 2010-10-08 18:36:54 EDT (Fri, 08 Oct 2010)
@@ -2,29 +2,12 @@
 // Distributed under the Boost Software License, Version 1.0.
 // See http://www.boost.org/LICENSE_1_0.txt
 
-// Adapted from llvm/libcxx/test/utilities/chrono
-//===----------------------------------------------------------------------===//
-//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-
-// duration
-
-// template <class Rep2, class Period2>
-// duration(const duration<Rep2, Period2>& d);
-
-// conversions from integral to floating point durations allowed
-
 #include <boost/chrono.hpp>
-#include <cassert>
+#include <boost/detail/lightweight_test.hpp>
 
 int main()
 {
     boost::chrono::duration<int> i(3);
     boost::chrono::duration<int> d = i;
- assert(d.count() == 3);
+ BOOST_TEST(d.count() == 3);
 }

Modified: sandbox/chrono/libs/chrono/test/duration/cons/default.pass.cpp
==============================================================================
--- sandbox/chrono/libs/chrono/test/duration/cons/default.pass.cpp (original)
+++ sandbox/chrono/libs/chrono/test/duration/cons/default.pass.cpp 2010-10-08 18:36:54 EDT (Fri, 08 Oct 2010)
@@ -2,24 +2,10 @@
 // Distributed under the Boost Software License, Version 1.0.
 // See http://www.boost.org/LICENSE_1_0.txt
 
-// Adapted from llvm/libcxx/test/utilities/chrono
-//===----------------------------------------------------------------------===//
-//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-
-// duration
-
-// duration() = default;
-
 // Rep must be default initialized, not initialized with 0
 
 #include <boost/chrono.hpp>
-#include <cassert>
+#include <boost/detail/lightweight_test.hpp>
 
 #include "../../rep.h"
 
@@ -28,10 +14,11 @@
 test()
 {
     D d;
- assert(d.count() == typename D::rep());
+ BOOST_TEST(d.count() == typename D::rep());
 }
 
 int main()
 {
     test<boost::chrono::duration<Rep> >();
+ return boost::report_errors();
 }

Modified: sandbox/chrono/libs/chrono/test/duration/cons/rep.pass.cpp
==============================================================================
--- sandbox/chrono/libs/chrono/test/duration/cons/rep.pass.cpp (original)
+++ sandbox/chrono/libs/chrono/test/duration/cons/rep.pass.cpp 2010-10-08 18:36:54 EDT (Fri, 08 Oct 2010)
@@ -2,23 +2,8 @@
 // Distributed under the Boost Software License, Version 1.0.
 // See http://www.boost.org/LICENSE_1_0.txt
 
-// Adapted from llvm/libcxx/test/utilities/chrono
-//===----------------------------------------------------------------------===//
-//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-
-// duration
-
-// template <class Rep2>
-// explicit duration(const Rep2& r);
-
 #include <boost/chrono.hpp>
-#include <cassert>
+#include <boost/detail/lightweight_test.hpp>
 
 #include "../../rep.h"
 
@@ -27,7 +12,7 @@
 test(R r)
 {
     D d(r);
- assert(d.count() == r);
+ BOOST_TEST(d.count() == r);
 }
 
 int main()
@@ -36,4 +21,5 @@
     test<boost::chrono::duration<int, boost::ratio<3, 2> > >(5);
     test<boost::chrono::duration<Rep, boost::ratio<3, 2> > >(Rep(3));
     test<boost::chrono::duration<double, boost::ratio<2, 3> > >(5.5);
+ return boost::report_errors();
 }

Modified: sandbox/chrono/libs/chrono/test/duration/cons/rep01.fail.cpp
==============================================================================
--- sandbox/chrono/libs/chrono/test/duration/cons/rep01.fail.cpp (original)
+++ sandbox/chrono/libs/chrono/test/duration/cons/rep01.fail.cpp 2010-10-08 18:36:54 EDT (Fri, 08 Oct 2010)
@@ -2,28 +2,13 @@
 // Distributed under the Boost Software License, Version 1.0.
 // See http://www.boost.org/LICENSE_1_0.txt
 
-// Adapted from llvm/libcxx/test/utilities/chrono
-//===----------------------------------------------------------------------===//
-//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-
-// duration
-
-// template <class Rep2>
-// explicit duration(const Rep2& r);
-
 // test for explicit
 
 #include <boost/chrono.hpp>
 
 #include "../../rep.h"
 
-int main()
+void test()
 {
     boost::chrono::duration<int> d = 1;
 }

Modified: sandbox/chrono/libs/chrono/test/duration/cons/rep02.fail.cpp
==============================================================================
--- sandbox/chrono/libs/chrono/test/duration/cons/rep02.fail.cpp (original)
+++ sandbox/chrono/libs/chrono/test/duration/cons/rep02.fail.cpp 2010-10-08 18:36:54 EDT (Fri, 08 Oct 2010)
@@ -2,28 +2,13 @@
 // Distributed under the Boost Software License, Version 1.0.
 // See http://www.boost.org/LICENSE_1_0.txt
 
-// Adapted from llvm/libcxx/test/utilities/chrono
-//===----------------------------------------------------------------------===//
-//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-
-// duration
-
-// template <class Rep2>
-// explicit duration(const Rep2& r);
-
 // Rep2 shall be implicitly convertible to rep
 
 #include <boost/chrono.hpp>
 
 #include "../../rep.h"
 
-int main()
+void test()
 {
     boost::chrono::duration<Rep> d(1);
 }

Modified: sandbox/chrono/libs/chrono/test/duration/cons/rep02.pass.cpp
==============================================================================
--- sandbox/chrono/libs/chrono/test/duration/cons/rep02.pass.cpp (original)
+++ sandbox/chrono/libs/chrono/test/duration/cons/rep02.pass.cpp 2010-10-08 18:36:54 EDT (Fri, 08 Oct 2010)
@@ -2,28 +2,14 @@
 // Distributed under the Boost Software License, Version 1.0.
 // See http://www.boost.org/LICENSE_1_0.txt
 
-// Adapted from llvm/libcxx/test/utilities/chrono
-//===----------------------------------------------------------------------===//
-//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-
-// duration
-
-// template <class Rep2>
-// explicit duration(const Rep2& r);
-
 // construct double with int
 
 #include <boost/chrono.hpp>
-#include <cassert>
+#include <boost/detail/lightweight_test.hpp>
 
 int main()
 {
     boost::chrono::duration<double> d(5);
- assert(d.count() == 5);
+ BOOST_TEST(d.count() == 5);
+ return boost::report_errors();
 }

Modified: sandbox/chrono/libs/chrono/test/duration/cons/rep03.fail.cpp
==============================================================================
--- sandbox/chrono/libs/chrono/test/duration/cons/rep03.fail.cpp (original)
+++ sandbox/chrono/libs/chrono/test/duration/cons/rep03.fail.cpp 2010-10-08 18:36:54 EDT (Fri, 08 Oct 2010)
@@ -2,26 +2,11 @@
 // Distributed under the Boost Software License, Version 1.0.
 // See http://www.boost.org/LICENSE_1_0.txt
 
-// Adapted from llvm/libcxx/test/utilities/chrono
-//===----------------------------------------------------------------------===//
-//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-
-// duration
-
-// template <class Rep2>
-// explicit duration(const Rep2& r);
-
-// treat_as_floating_point<Rep2>::value shall be false
+// treat_as_floating_point<Rep2>::value must be false
 
 #include <boost/chrono.hpp>
 
-int main()
+void test()
 {
     boost::chrono::duration<int> d(1.);
 }

Modified: sandbox/chrono/libs/chrono/test/duration/default_ratio.pass.cpp
==============================================================================
--- sandbox/chrono/libs/chrono/test/duration/default_ratio.pass.cpp (original)
+++ sandbox/chrono/libs/chrono/test/duration/default_ratio.pass.cpp 2010-10-08 18:36:54 EDT (Fri, 08 Oct 2010)
@@ -2,20 +2,7 @@
 // Distributed under the Boost Software License, Version 1.0.
 // See http://www.boost.org/LICENSE_1_0.txt
 
-// Adapted from llvm/libcxx/test/utilities/chrono
-//===----------------------------------------------------------------------===//
-//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-
-// <chrono>
-
 // duration
-
 // Test default template arg:
 
 // template <class Rep, class Period = ratio<1>>
@@ -27,8 +14,7 @@
 #define NOTHING ""
 #endif
 
-int main()
-{
- BOOST_CHRONO_STATIC_ASSERT((boost::is_same<boost::chrono::duration<int, boost::ratio<1> >,
- boost::chrono::duration<int> >::value), NOTHING, ());
-}
+BOOST_CHRONO_STATIC_ASSERT((boost::is_same<
+ boost::chrono::duration<int, boost::ratio<1> >,
+ boost::chrono::duration<int>
+>::value), NOTHING, ());

Modified: sandbox/chrono/libs/chrono/test/duration/duration.fail.cpp
==============================================================================
--- sandbox/chrono/libs/chrono/test/duration/duration.fail.cpp (original)
+++ sandbox/chrono/libs/chrono/test/duration/duration.fail.cpp 2010-10-08 18:36:54 EDT (Fri, 08 Oct 2010)
@@ -2,26 +2,14 @@
 // Distributed under the Boost Software License, Version 1.0.
 // See http://www.boost.org/LICENSE_1_0.txt
 
-// Adapted from llvm/libcxx/test/utilities/chrono
-//===----------------------------------------------------------------------===//
-//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-
 // duration
-
 // If a program instantiates duration with a duration type for the template
 // argument Rep a diagnostic is required.
 
 #include <boost/chrono.hpp>
 
-int main()
+void test()
 {
     typedef boost::chrono::duration<boost::chrono::milliseconds> D;
     D d;
- return 0;
 }

Modified: sandbox/chrono/libs/chrono/test/duration/nonmember/op_divide_duration.pass.cpp
==============================================================================
--- sandbox/chrono/libs/chrono/test/duration/nonmember/op_divide_duration.pass.cpp (original)
+++ sandbox/chrono/libs/chrono/test/duration/nonmember/op_divide_duration.pass.cpp 2010-10-08 18:36:54 EDT (Fri, 08 Oct 2010)
@@ -2,45 +2,30 @@
 // Distributed under the Boost Software License, Version 1.0.
 // See http://www.boost.org/LICENSE_1_0.txt
 
-// Adapted from llvm/libcxx/test/utilities/chrono
-//===----------------------------------------------------------------------===//
-//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-
-// duration
-
-// template <class Rep1, class Period1, class Rep2, class Period2>
-// typename common_type<Rep1, Rep2>::type
-// operator/(const duration<Rep1, Period1>& lhs, const duration<Rep2, Period2>& rhs);
-
 #include <boost/chrono.hpp>
-#include <cassert>
+#include <boost/detail/lightweight_test.hpp>
 
 int main()
 {
     {
     boost::chrono::nanoseconds ns1(15);
     boost::chrono::nanoseconds ns2(5);
- assert(ns1 / ns2 == 3);
+ BOOST_TEST(ns1 / ns2 == 3);
     }
     {
     boost::chrono::microseconds us1(15);
     boost::chrono::nanoseconds ns2(5);
- assert(us1 / ns2 == 3000);
+ BOOST_TEST(us1 / ns2 == 3000);
     }
     {
     boost::chrono::duration<int, boost::ratio<2, 3> > s1(30);
     boost::chrono::duration<int, boost::ratio<3, 5> > s2(5);
- assert(s1 / s2 == 6);
+ BOOST_TEST(s1 / s2 == 6);
     }
     {
     boost::chrono::duration<int, boost::ratio<2, 3> > s1(30);
     boost::chrono::duration<double, boost::ratio<3, 5> > s2(5);
- assert(s1 / s2 == 20./3);
+ BOOST_TEST(s1 / s2 == 20./3);
     }
+ return boost::report_errors();
 }

Modified: sandbox/chrono/libs/chrono/test/duration/nonmember/op_divide_rep.fail.cpp
==============================================================================
--- sandbox/chrono/libs/chrono/test/duration/nonmember/op_divide_rep.fail.cpp (original)
+++ sandbox/chrono/libs/chrono/test/duration/nonmember/op_divide_rep.fail.cpp 2010-10-08 18:36:54 EDT (Fri, 08 Oct 2010)
@@ -2,27 +2,11 @@
 // Distributed under the Boost Software License, Version 1.0.
 // See http://www.boost.org/LICENSE_1_0.txt
 
-// Adapted from llvm/libcxx/test/utilities/chrono
-//===----------------------------------------------------------------------===//
-//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-
-// duration
-
-// template <class Rep1, class Period, class Rep2>
-// duration<typename common_type<Rep1, Rep2>::type, Period>
-// operator/(const duration<Rep1, Period>& d, const Rep2& s);
-
 #include <boost/chrono.hpp>
 
 #include "../../rep.h"
 
-int main()
+void test()
 {
     boost::chrono::duration<Rep> d(Rep(15));
     d = d / 5;

Modified: sandbox/chrono/libs/chrono/test/duration/nonmember/op_divide_rep.pass.cpp
==============================================================================
--- sandbox/chrono/libs/chrono/test/duration/nonmember/op_divide_rep.pass.cpp (original)
+++ sandbox/chrono/libs/chrono/test/duration/nonmember/op_divide_rep.pass.cpp 2010-10-08 18:36:54 EDT (Fri, 08 Oct 2010)
@@ -2,28 +2,13 @@
 // Distributed under the Boost Software License, Version 1.0.
 // See http://www.boost.org/LICENSE_1_0.txt
 
-// Adapted from llvm/libcxx/test/utilities/chrono
-//===----------------------------------------------------------------------===//
-//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-
-// duration
-
-// template <class Rep1, class Period, class Rep2>
-// duration<typename common_type<Rep1, Rep2>::type, Period>
-// operator/(const duration<Rep1, Period>& d, const Rep2& s);
-
 #include <boost/chrono.hpp>
-#include <cassert>
+#include <boost/detail/lightweight_test.hpp>
 
 int main()
 {
     boost::chrono::nanoseconds ns(15);
     ns = ns / 5;
- assert(ns.count() == 3);
+ BOOST_TEST(ns.count() == 3);
+ return boost::report_errors();
 }

Modified: sandbox/chrono/libs/chrono/test/duration/nonmember/op_minus.pass.cpp
==============================================================================
--- sandbox/chrono/libs/chrono/test/duration/nonmember/op_minus.pass.cpp (original)
+++ sandbox/chrono/libs/chrono/test/duration/nonmember/op_minus.pass.cpp 2010-10-08 18:36:54 EDT (Fri, 08 Oct 2010)
@@ -2,26 +2,8 @@
 // Distributed under the Boost Software License, Version 1.0.
 // See http://www.boost.org/LICENSE_1_0.txt
 
-// Adapted from llvm/libcxx/test/utilities/chrono
-//===----------------------------------------------------------------------===//
-//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-
-// <chrono>
-
-// duration
-
-// template <class Rep1, class Period1, class Rep2, class Period2>
-// typename common_type<duration<Rep1, Period1>, duration<Rep2, Period2>>::type
-// operator-(const duration<Rep1, Period1>& lhs, const duration<Rep2, Period2>& rhs);
-
 #include <boost/chrono.hpp>
-#include <cassert>
+#include <boost/detail/lightweight_test.hpp>
 
 int main()
 {
@@ -49,4 +31,5 @@
     boost::chrono::duration<double, boost::ratio<1, 15> > r = s1 - s2;
     assert(r.count() == -15);
     }
+ return boost::report_errors();
 }

Modified: sandbox/chrono/libs/chrono/test/duration/nonmember/op_mod_duration.pass.cpp
==============================================================================
--- sandbox/chrono/libs/chrono/test/duration/nonmember/op_mod_duration.pass.cpp (original)
+++ sandbox/chrono/libs/chrono/test/duration/nonmember/op_mod_duration.pass.cpp 2010-10-08 18:36:54 EDT (Fri, 08 Oct 2010)
@@ -2,24 +2,8 @@
 // Distributed under the Boost Software License, Version 1.0.
 // See http://www.boost.org/LICENSE_1_0.txt
 
-// Adapted from llvm/libcxx/test/utilities/chrono
-//===----------------------------------------------------------------------===//
-//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-
-// duration
-
-// template <class Rep1, class Period1, class Rep2, class Period2>
-// typename common_type<duration<Rep1, Period1>, duration<Rep2, Period2>>::type
-// operator%(const duration<Rep1, Period1>& lhs, const duration<Rep2, Period2>& rhs);
-
 #include <boost/chrono.hpp>
-#include <cassert>
+#include <boost/detail/lightweight_test.hpp>
 
 int main()
 {
@@ -27,18 +11,19 @@
     boost::chrono::nanoseconds ns1(15);
     boost::chrono::nanoseconds ns2(6);
     boost::chrono::nanoseconds r = ns1 % ns2;
- assert(r.count() == 3);
+ BOOST_TEST(r.count() == 3);
     }
     {
     boost::chrono::microseconds us1(15);
     boost::chrono::nanoseconds ns2(28);
     boost::chrono::nanoseconds r = us1 % ns2;
- assert(r.count() == 20);
+ BOOST_TEST(r.count() == 20);
     }
     {
     boost::chrono::duration<int, boost::ratio<3, 5> > s1(6);
     boost::chrono::duration<int, boost::ratio<2, 3> > s2(3);
     boost::chrono::duration<int, boost::ratio<1, 15> > r = s1 % s2;
- assert(r.count() == 24);
+ BOOST_TEST(r.count() == 24);
     }
+ return boost::report_errors();
 }

Modified: sandbox/chrono/libs/chrono/test/duration/nonmember/op_mod_rep.fail.cpp
==============================================================================
--- sandbox/chrono/libs/chrono/test/duration/nonmember/op_mod_rep.fail.cpp (original)
+++ sandbox/chrono/libs/chrono/test/duration/nonmember/op_mod_rep.fail.cpp 2010-10-08 18:36:54 EDT (Fri, 08 Oct 2010)
@@ -2,27 +2,11 @@
 // Distributed under the Boost Software License, Version 1.0.
 // See http://www.boost.org/LICENSE_1_0.txt
 
-// Adapted from llvm/libcxx/test/utilities/chrono
-//===----------------------------------------------------------------------===//
-//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-
-// duration
-
-// template <class Rep1, class Period, class Rep2>
-// duration<typename common_type<Rep1, Rep2>::type, Period>
-// operator%(const duration<Rep1, Period>& d, const Rep2& s)
-
 #include <boost/chrono.hpp>
 
 #include "../../rep.h"
 
-int main()
+void test()
 {
     boost::chrono::duration<Rep> d(Rep(15));
     d = d % 5;

Modified: sandbox/chrono/libs/chrono/test/duration/nonmember/op_mod_rep.pass.cpp
==============================================================================
--- sandbox/chrono/libs/chrono/test/duration/nonmember/op_mod_rep.pass.cpp (original)
+++ sandbox/chrono/libs/chrono/test/duration/nonmember/op_mod_rep.pass.cpp 2010-10-08 18:36:54 EDT (Fri, 08 Oct 2010)
@@ -2,28 +2,13 @@
 // Distributed under the Boost Software License, Version 1.0.
 // See http://www.boost.org/LICENSE_1_0.txt
 
-// Adapted from llvm/libcxx/test/utilities/chrono
-//===----------------------------------------------------------------------===//
-//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-
-// duration
-
-// template <class Rep1, class Period, class Rep2>
-// duration<typename common_type<Rep1, Rep2>::type, Period>
-// operator%(const duration<Rep1, Period>& d, const Rep2& s)
-
 #include <boost/chrono.hpp>
-#include <cassert>
+#include <boost/detail/lightweight_test.hpp>
 
 int main()
 {
     boost::chrono::nanoseconds ns(15);
     ns = ns % 6;
     assert(ns.count() == 3);
+ return boost::report_errors();
 }

Modified: sandbox/chrono/libs/chrono/test/duration/nonmember/op_plus.pass.cpp
==============================================================================
--- sandbox/chrono/libs/chrono/test/duration/nonmember/op_plus.pass.cpp (original)
+++ sandbox/chrono/libs/chrono/test/duration/nonmember/op_plus.pass.cpp 2010-10-08 18:36:54 EDT (Fri, 08 Oct 2010)
@@ -2,26 +2,8 @@
 // Distributed under the Boost Software License, Version 1.0.
 // See http://www.boost.org/LICENSE_1_0.txt
 
-// Adapted from llvm/libcxx/test/utilities/chrono
-//===----------------------------------------------------------------------===//
-//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-
-// <chrono>
-
-// duration
-
-// template <class Rep1, class Period1, class Rep2, class Period2>
-// typename common_type<duration<Rep1, Period1>, duration<Rep2, Period2>>::type
-// operator+(const duration<Rep1, Period1>& lhs, const duration<Rep2, Period2>& rhs);
-
 #include <boost/chrono.hpp>
-#include <cassert>
+#include <boost/detail/lightweight_test.hpp>
 
 int main()
 {
@@ -29,24 +11,25 @@
     boost::chrono::seconds s1(3);
     boost::chrono::seconds s2(5);
     boost::chrono::seconds r = s1 + s2;
- assert(r.count() == 8);
+ BOOST_TEST(r.count() == 8);
     }
     {
     boost::chrono::seconds s1(3);
     boost::chrono::microseconds s2(5);
     boost::chrono::microseconds r = s1 + s2;
- assert(r.count() == 3000005);
+ BOOST_TEST(r.count() == 3000005);
     }
     {
     boost::chrono::duration<int, boost::ratio<2, 3> > s1(3);
     boost::chrono::duration<int, boost::ratio<3, 5> > s2(5);
     boost::chrono::duration<int, boost::ratio<1, 15> > r = s1 + s2;
- assert(r.count() == 75);
+ BOOST_TEST(r.count() == 75);
     }
     {
     boost::chrono::duration<int, boost::ratio<2, 3> > s1(3);
     boost::chrono::duration<double, boost::ratio<3, 5> > s2(5);
     boost::chrono::duration<double, boost::ratio<1, 15> > r = s1 + s2;
- assert(r.count() == 75);
+ BOOST_TEST(r.count() == 75);
     }
+ return boost::report_errors();
 }

Modified: sandbox/chrono/libs/chrono/test/duration/nonmember/op_times_rep.pass.cpp
==============================================================================
--- sandbox/chrono/libs/chrono/test/duration/nonmember/op_times_rep.pass.cpp (original)
+++ sandbox/chrono/libs/chrono/test/duration/nonmember/op_times_rep.pass.cpp 2010-10-08 18:36:54 EDT (Fri, 08 Oct 2010)
@@ -2,34 +2,15 @@
 // Distributed under the Boost Software License, Version 1.0.
 // See http://www.boost.org/LICENSE_1_0.txt
 
-// Adapted from llvm/libcxx/test/utilities/chrono
-//===----------------------------------------------------------------------===//
-//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-
-// duration
-
-// template <class Rep1, class Period, class Rep2>
-// duration<typename common_type<Rep1, Rep2>::type, Period>
-// operator*(const duration<Rep1, Period>& d, const Rep2& s);
-
-// template <class Rep1, class Period, class Rep2>
-// duration<typename common_type<Rep1, Rep2>::type, Period>
-// operator*(const Rep1& s, const duration<Rep2, Period>& d);
-
 #include <boost/chrono.hpp>
-#include <cassert>
+#include <boost/detail/lightweight_test.hpp>
 
 int main()
 {
     boost::chrono::nanoseconds ns(3);
     ns = ns * 5;
- assert(ns.count() == 15);
+ BOOST_TEST(ns.count() == 15);
     ns = 6 * ns;
- assert(ns.count() == 90);
+ BOOST_TEST(ns.count() == 90);
+ return boost::report_errors();
 }

Modified: sandbox/chrono/libs/chrono/test/duration/nonmember/op_times_rep1.fail.cpp
==============================================================================
--- sandbox/chrono/libs/chrono/test/duration/nonmember/op_times_rep1.fail.cpp (original)
+++ sandbox/chrono/libs/chrono/test/duration/nonmember/op_times_rep1.fail.cpp 2010-10-08 18:36:54 EDT (Fri, 08 Oct 2010)
@@ -2,31 +2,11 @@
 // Distributed under the Boost Software License, Version 1.0.
 // See http://www.boost.org/LICENSE_1_0.txt
 
-// Adapted from llvm/libcxx/test/utilities/chrono
-//===----------------------------------------------------------------------===//
-//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-
-// duration
-
-// template <class Rep1, class Period, class Rep2>
-// duration<typename common_type<Rep1, Rep2>::type, Period>
-// operator*(const duration<Rep1, Period>& d, const Rep2& s);
-
-// template <class Rep1, class Period, class Rep2>
-// duration<typename common_type<Rep1, Rep2>::type, Period>
-// operator*(const Rep1& s, const duration<Rep2, Period>& d);
-
 #include <boost/chrono.hpp>
 
 #include "../../rep.h"
 
-int main()
+void test()
 {
     boost::chrono::duration<Rep> d;
     d = d * 5;

Modified: sandbox/chrono/libs/chrono/test/duration/nonmember/op_times_rep2.fail.cpp
==============================================================================
--- sandbox/chrono/libs/chrono/test/duration/nonmember/op_times_rep2.fail.cpp (original)
+++ sandbox/chrono/libs/chrono/test/duration/nonmember/op_times_rep2.fail.cpp 2010-10-08 18:36:54 EDT (Fri, 08 Oct 2010)
@@ -2,31 +2,11 @@
 // Distributed under the Boost Software License, Version 1.0.
 // See http://www.boost.org/LICENSE_1_0.txt
 
-// Adapted from llvm/libcxx/test/utilities/chrono
-//===----------------------------------------------------------------------===//
-//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-
-// duration
-
-// template <class Rep1, class Period, class Rep2>
-// duration<typename common_type<Rep1, Rep2>::type, Period>
-// operator*(const duration<Rep1, Period>& d, const Rep2& s);
-
-// template <class Rep1, class Period, class Rep2>
-// duration<typename common_type<Rep1, Rep2>::type, Period>
-// operator*(const Rep1& s, const duration<Rep2, Period>& d);
-
 #include <boost/chrono.hpp>
 
 #include "../../rep.h"
 
-int main()
+void test()
 {
     boost::chrono::duration<Rep> d;
     d = 5 * d;

Deleted: sandbox/chrono/libs/chrono/test/duration/observer/tested_elsewhere.pass.cpp
==============================================================================
--- sandbox/chrono/libs/chrono/test/duration/observer/tested_elsewhere.pass.cpp 2010-10-08 18:36:54 EDT (Fri, 08 Oct 2010)
+++ (empty file)
@@ -1,17 +0,0 @@
-// Copyright 2010 Vicente J. Botet Escriba
-// Distributed under the Boost Software License, Version 1.0.
-// See http://www.boost.org/LICENSE_1_0.txt
-
-// Adapted from llvm/libcxx/test/utilities/chrono
-//===----------------------------------------------------------------------===//
-//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-
-int main()
-{
-}

Modified: sandbox/chrono/libs/chrono/test/duration/positive_num.fail.cpp
==============================================================================
--- sandbox/chrono/libs/chrono/test/duration/positive_num.fail.cpp (original)
+++ sandbox/chrono/libs/chrono/test/duration/positive_num.fail.cpp 2010-10-08 18:36:54 EDT (Fri, 08 Oct 2010)
@@ -2,23 +2,12 @@
 // Distributed under the Boost Software License, Version 1.0.
 // See http://www.boost.org/LICENSE_1_0.txt
 
-// Adapted from llvm/libcxx/test/utilities/chrono
-//===----------------------------------------------------------------------===//
-//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-
 // duration
-
-// Period::num shall be positive, diagnostic required.
+// Period::num must be positive, diagnostic required.
 
 #include <boost/chrono.hpp>
 
-int main()
+void test()
 {
     typedef boost::chrono::duration<int, boost::ratio<5, -1> > D;
     D d;

Modified: sandbox/chrono/libs/chrono/test/duration/ratio.fail.cpp
==============================================================================
--- sandbox/chrono/libs/chrono/test/duration/ratio.fail.cpp (original)
+++ sandbox/chrono/libs/chrono/test/duration/ratio.fail.cpp 2010-10-08 18:36:54 EDT (Fri, 08 Oct 2010)
@@ -2,32 +2,13 @@
 // Distributed under the Boost Software License, Version 1.0.
 // See http://www.boost.org/LICENSE_1_0.txt
 
-// Adapted from llvm/libcxx/test/utilities/chrono
-//===----------------------------------------------------------------------===//
-//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-
 // duration
-
 // Period shall be a specialization of ratio, diagnostic required.
 
 #include <boost/chrono.hpp>
 
-template <int N, int D = 1>
-class Ratio
-{
-public:
- static const int num = N;
- static const int den = D;
-};
-
-int main()
+void test()
 {
- typedef boost::chrono::duration<int, Ratio<1> > D;
+ typedef boost::chrono::duration<int, int > D;
     D d;
 }

Modified: sandbox/chrono/libs/chrono/test/duration/special/max.pass.cpp
==============================================================================
--- sandbox/chrono/libs/chrono/test/duration/special/max.pass.cpp (original)
+++ sandbox/chrono/libs/chrono/test/duration/special/max.pass.cpp 2010-10-08 18:36:54 EDT (Fri, 08 Oct 2010)
@@ -2,23 +2,8 @@
 // Distributed under the Boost Software License, Version 1.0.
 // See http://www.boost.org/LICENSE_1_0.txt
 
-// Adapted from llvm/libcxx/test/utilities/chrono
-//===----------------------------------------------------------------------===//
-//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-
-// duration
-
-// static constexpr duration max();
-
 #include <boost/chrono.hpp>
-#include <limits>
-#include <cassert>
+#include <boost/detail/lightweight_test.hpp>
 
 #include "../../rep.h"
 
@@ -27,11 +12,12 @@
 {
     typedef typename D::rep Rep;
     Rep max_rep = boost::chrono::duration_values<Rep>::max();
- assert(D::max().count() == max_rep);
+ BOOST_TEST(D::max().count() == max_rep);
 }
 
 int main()
 {
     test<boost::chrono::duration<int> >();
     test<boost::chrono::duration<Rep> >();
+ return boost::report_errors();
 }

Modified: sandbox/chrono/libs/chrono/test/duration/special/min.pass.cpp
==============================================================================
--- sandbox/chrono/libs/chrono/test/duration/special/min.pass.cpp (original)
+++ sandbox/chrono/libs/chrono/test/duration/special/min.pass.cpp 2010-10-08 18:36:54 EDT (Fri, 08 Oct 2010)
@@ -2,23 +2,8 @@
 // Distributed under the Boost Software License, Version 1.0.
 // See http://www.boost.org/LICENSE_1_0.txt
 
-// Adapted from llvm/libcxx/test/utilities/chrono
-//===----------------------------------------------------------------------===//
-//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-
-// duration
-
-// static constexpr duration min();
-
 #include <boost/chrono.hpp>
-#include <boost/limits.hpp>
-#include <cassert>
+#include <boost/detail/lightweight_test.hpp>
 
 #include "../../rep.h"
 
@@ -27,11 +12,12 @@
 {
     typedef typename D::rep Rep;
     Rep min_rep = boost::chrono::duration_values<Rep>::min();
- assert(D::min().count() == min_rep);
+ BOOST_TEST(D::min().count() == min_rep);
 }
 
 int main()
 {
     test<boost::chrono::duration<int> >();
     test<boost::chrono::duration<Rep> >();
+ return boost::report_errors();
 }

Modified: sandbox/chrono/libs/chrono/test/duration/special/zero.pass.cpp
==============================================================================
--- sandbox/chrono/libs/chrono/test/duration/special/zero.pass.cpp (original)
+++ sandbox/chrono/libs/chrono/test/duration/special/zero.pass.cpp 2010-10-08 18:36:54 EDT (Fri, 08 Oct 2010)
@@ -2,22 +2,8 @@
 // Distributed under the Boost Software License, Version 1.0.
 // See http://www.boost.org/LICENSE_1_0.txt
 
-// Adapted from llvm/libcxx/test/utilities/chrono
-//===----------------------------------------------------------------------===//
-//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-
-// duration
-
-// static constexpr duration zero();
-
 #include <boost/chrono.hpp>
-#include <cassert>
+#include <boost/detail/lightweight_test.hpp>
 
 #include "../../rep.h"
 
@@ -26,11 +12,12 @@
 {
     typedef typename D::rep Rep;
     Rep zero_rep = boost::chrono::duration_values<Rep>::zero();
- assert(D::zero().count() == zero_rep);
+ BOOST_TEST(D::zero().count() == zero_rep);
 }
 
 int main()
 {
     test<boost::chrono::duration<int> >();
     test<boost::chrono::duration<Rep> >();
+ return boost::report_errors();
 }

Modified: sandbox/chrono/libs/chrono/test/duration/types.pass.cpp
==============================================================================
--- sandbox/chrono/libs/chrono/test/duration/types.pass.cpp (original)
+++ sandbox/chrono/libs/chrono/test/duration/types.pass.cpp 2010-10-08 18:36:54 EDT (Fri, 08 Oct 2010)
@@ -2,18 +2,7 @@
 // Distributed under the Boost Software License, Version 1.0.
 // See http://www.boost.org/LICENSE_1_0.txt
 
-// Adapted from llvm/libcxx/test/utilities/chrono
-//===----------------------------------------------------------------------===//
-//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-
 // duration
-
 // Test nested types
 
 // typedef Rep rep;
@@ -25,9 +14,6 @@
 #define NOTHING ""
 #endif
 
-int main()
-{
- typedef boost::chrono::duration<long, boost::ratio<3, 2> > D;
- BOOST_CHRONO_STATIC_ASSERT((boost::is_same<D::rep, long>::value), NOTHING, ());
- BOOST_CHRONO_STATIC_ASSERT((boost::is_same<D::period, boost::ratio<3, 2> >::value), NOTHING, ());
-}
+typedef boost::chrono::duration<long, boost::ratio<3, 2> > D;
+BOOST_CHRONO_STATIC_ASSERT((boost::is_same<D::rep, long>::value), NOTHING, ());
+BOOST_CHRONO_STATIC_ASSERT((boost::is_same<D::period, boost::ratio<3, 2> >::value), NOTHING, ());


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