|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r66325 - in sandbox/chrono/libs/chrono/test: . clock/hires clock/monotonic duration/cons
From: vicente.botet_at_[hidden]
Date: 2010-11-01 15:16:42
Author: viboes
Date: 2010-11-01 15:16:40 EDT (Mon, 01 Nov 2010)
New Revision: 66325
URL: http://svn.boost.org/trac/boost/changeset/66325
Log:
Chrono: Refactor tests
Removed:
sandbox/chrono/libs/chrono/test/duration/cons/convert_exact.pass.cpp
sandbox/chrono/libs/chrono/test/duration/cons/convert_inexact.pass.cpp
sandbox/chrono/libs/chrono/test/duration/cons/default.pass.cpp
sandbox/chrono/libs/chrono/test/duration/cons/rep.pass.cpp
sandbox/chrono/libs/chrono/test/duration/cons/rep02.pass.cpp
sandbox/chrono/libs/chrono/test/hours.pass.cpp
sandbox/chrono/libs/chrono/test/microseconds.pass.cpp
sandbox/chrono/libs/chrono/test/milliseconds.pass.cpp
sandbox/chrono/libs/chrono/test/minutes.pass.cpp
sandbox/chrono/libs/chrono/test/nanoseconds.pass.cpp
sandbox/chrono/libs/chrono/test/seconds.pass.cpp
Text files modified:
sandbox/chrono/libs/chrono/test/Jamfile.v2 | 92 +++++++++++++--------------------------
sandbox/chrono/libs/chrono/test/clock/hires/now.pass.cpp | 6 +-
sandbox/chrono/libs/chrono/test/clock/monotonic/now.pass.cpp | 5 -
3 files changed, 35 insertions(+), 68 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-11-01 15:16:40 EDT (Mon, 01 Nov 2010)
@@ -189,16 +189,6 @@
[ chrono-run test_thread_clock.cpp ]
;
- test-suite "typedefs"
- :
- [ chrono-compile hours.pass.cpp : : ]
- [ chrono-compile minutes.pass.cpp : : ]
- [ chrono-compile seconds.pass.cpp : : ]
- [ chrono-compile milliseconds.pass.cpp : : ]
- [ chrono-compile microseconds.pass.cpp : : ]
- [ chrono-compile nanoseconds.pass.cpp : : ]
- ;
-
test-suite "traits"
:
[ chrono-compile traits/specializations/duration.pass.cpp ]
@@ -211,58 +201,36 @@
test-suite "duration"
:
- [ compile-fail duration/duration.fail.cpp ]
- [ compile-fail duration/ratio.fail.cpp ]
- [ compile-fail duration/positive_num.fail.cpp ]
- [ chrono-compile duration/default_ratio.pass.cpp ]
- [ chrono-compile duration/types.pass.cpp ]
-
- [ chrono-run duration/arithmetic/op_divide_ass.pass.cpp ]
- [ chrono-run duration/arithmetic/op_minusminusint.pass.cpp ]
- [ chrono-run duration/arithmetic/op_plus_ass.pass.cpp ]
- [ chrono-run duration/arithmetic/op_minus.pass.cpp ]
- [ chrono-run duration/arithmetic/op_mod_ass_duration.pass.cpp ]
- [ chrono-run duration/arithmetic/op_plusplus.pass.cpp ]
- [ chrono-run duration/arithmetic/op_minus_ass.pass.cpp ]
- [ chrono-run duration/arithmetic/op_mod_ass_rep.pass.cpp ]
- [ chrono-run duration/arithmetic/op_plusplusint.pass.cpp ]
- [ chrono-run duration/arithmetic/op_minusminus.pass.cpp ]
- [ chrono-run duration/arithmetic/op_plus.pass.cpp ]
- [ chrono-run duration/arithmetic/op_times_ass.pass.cpp ]
-
- [ chrono-run duration/cast/duration_cast.pass.cpp ]
- [ compile-fail duration/cast/toduration.fail.cpp ]
-
- [ chrono-run duration/comparisons/op_equal.pass.cpp ]
- [ chrono-run duration/comparisons/op_less.pass.cpp ]
-
- [ chrono-run duration/cons/convert_exact.pass.cpp ]
- [ compile-fail duration/cons/convert_float_to_int.fail.cpp ]
- [ compile-fail duration/cons/convert_inexact.fail.cpp ]
- [ chrono-run duration/cons/convert_inexact.pass.cpp ]
- [ chrono-run duration/cons/convert_int_to_float.pass.cpp ]
- [ chrono-run duration/cons/default.pass.cpp ]
- [ chrono-run duration/cons/rep.pass.cpp ]
- [ compile-fail duration/cons/rep01.fail.cpp ]
- [ compile-fail duration/cons/rep02.fail.cpp ]
- [ chrono-run duration/cons/rep02.pass.cpp ]
- [ compile-fail duration/cons/rep03.fail.cpp ]
-
- [ chrono-run2 duration/nonmember/op_plus.pass.cpp : nonmember_op_plus.pass ]
- [ chrono-run2 duration/nonmember/op_minus.pass.cpp : nonmember_op_minus.pass ]
- [ chrono-run2 duration/nonmember/op_divide_duration.pass.cpp : nonmember_op_divide_duration.pass ]
- [ compile-fail duration/nonmember/op_divide_rep.fail.cpp : : nonmember_op_divide_rep.fail ]
- [ chrono-run2 duration/nonmember/op_divide_rep.pass.cpp : nonmember_op_divide_rep.pass ]
- [ chrono-run2 duration/nonmember/op_mod_duration.pass.cpp : nonmember_op_mod_duration.pass ]
- [ chrono-run2 duration/nonmember/op_mod_rep.pass.cpp : nonmember_op_mod_rep.pass ]
- [ compile-fail duration/nonmember/op_mod_rep.fail.cpp : : nonmember_op_mod_rep.fail ]
- [ chrono-run2 duration/nonmember/op_times_rep.pass.cpp : nonmember_op_times_rep.pass ]
- [ compile-fail duration/nonmember/op_times_rep1.fail.cpp : : nonmember_op_times_rep1.fail ]
- [ compile-fail duration/nonmember/op_times_rep2.fail.cpp : : nonmember_op_times_rep2.fail ]
-
- [ chrono-run2 duration/special/max.pass.cpp : duration_special_max.pass ]
- [ chrono-run2 duration/special/min.pass.cpp : duration_special_min.pass ]
- [ chrono-run2 duration/special/zero.pass.cpp : duration_special_zero.pass ]
+ [ compile-fail duration/duration_duration_fail.cpp ]
+ [ compile-fail duration/ratio_fail.cpp ]
+ [ compile-fail duration/positive_num_fail.cpp ]
+ [ chrono-compile duration/default_ratio_pass.cpp ]
+ [ chrono-compile duration/types_pass.cpp ]
+ [ chrono-compile duration/ratio_alias_pass.cpp ]
+
+ [ chrono-compile duration/typedefs_pass.cpp ]
+
+ [ chrono-run duration/arithmetic_pass.cpp ]
+
+ [ chrono-run duration/duration_cast_pass.cpp ]
+ [ compile-fail duration/duration_cast_int_fail.cpp ]
+
+ [ chrono-run duration/comparisons_pass.cpp ]
+
+ [ chrono-run duration/constructor_pass.cpp ]
+
+ [ compile-fail duration/cons/convert_float_to_int_fail.cpp ]
+ [ compile-fail duration/cons/convert_inexact_fail.cpp ]
+ [ compile-fail duration/cons/implicit_constructot_fail.cpp ]
+ [ compile-fail duration/cons/non_implicit_convertible_rep_fail.cpp ]
+ [ compile-fail duration/cons/treat_as_floating_point_Rep2_true_fail.cpp ]
+
+ [ compile-fail duration/nonmember/divide_rep2_fail.cpp ]
+ [ compile-fail duration/nonmember/modulus_rep2_fail.cpp ]
+ [ compile-fail duration/nonmember/times_rep2_lhs_fail.cpp ]
+ [ compile-fail duration/nonmember/times_rep2_rhs_fail.cpp ]
+
+ [ chrono-run duration/duration_values_pass.cpp ]
;
test-suite "time_point"
Modified: sandbox/chrono/libs/chrono/test/clock/hires/now.pass.cpp
==============================================================================
--- sandbox/chrono/libs/chrono/test/clock/hires/now.pass.cpp (original)
+++ sandbox/chrono/libs/chrono/test/clock/hires/now.pass.cpp 2010-11-01 15:16:40 EDT (Mon, 01 Nov 2010)
@@ -8,8 +8,8 @@
int main()
{
- check_clock_now<boost::chrono::high_resolution_clock>();
- check_clock_now_ec<boost::chrono::high_resolution_clock>();
- check_clock_now_throws<boost::chrono::high_resolution_clock>();
+ check_clock_now<boost::chrono::high_resolution_clock>();
+ check_clock_now_ec<boost::chrono::high_resolution_clock>();
+ check_clock_now_throws<boost::chrono::high_resolution_clock>();
return boost::report_errors();
}
Modified: sandbox/chrono/libs/chrono/test/clock/monotonic/now.pass.cpp
==============================================================================
--- sandbox/chrono/libs/chrono/test/clock/monotonic/now.pass.cpp (original)
+++ sandbox/chrono/libs/chrono/test/clock/monotonic/now.pass.cpp 2010-11-01 15:16:40 EDT (Mon, 01 Nov 2010)
@@ -13,10 +13,9 @@
int main()
{
#ifdef BOOST_CHRONO_HAS_CLOCK_MONOTONIC
- check_clock_now<boost::chrono::monotonic_clock>();
- check_clock_now_ec<boost::chrono::monotonic_clock>();
+ check_clock_now<boost::chrono::monotonic_clock>();
+ check_clock_now_ec<boost::chrono::monotonic_clock>();
check_clock_now_throws<boost::chrono::monotonic_clock>();
-
#endif
return boost::report_errors();
}
Deleted: sandbox/chrono/libs/chrono/test/duration/cons/convert_exact.pass.cpp
==============================================================================
--- sandbox/chrono/libs/chrono/test/duration/cons/convert_exact.pass.cpp 2010-11-01 15:16:40 EDT (Mon, 01 Nov 2010)
+++ (empty file)
@@ -1,16 +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
-
-// exact conversions allowed for integral reps
-
-#include <boost/chrono.hpp>
-#include <boost/detail/lightweight_test.hpp>
-
-int main()
-{
- boost::chrono::milliseconds ms(1);
- boost::chrono::microseconds us = ms;
- BOOST_TEST(us.count() == 1000);
- return boost::report_errors();
-}
Deleted: sandbox/chrono/libs/chrono/test/duration/cons/convert_inexact.pass.cpp
==============================================================================
--- sandbox/chrono/libs/chrono/test/duration/cons/convert_inexact.pass.cpp 2010-11-01 15:16:40 EDT (Mon, 01 Nov 2010)
+++ (empty file)
@@ -1,16 +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
-
-// inexact conversions allowed for floating point reps
-
-#include <boost/chrono.hpp>
-#include <boost/detail/lightweight_test.hpp>
-
-int main()
-{
- boost::chrono::duration<double, boost::micro> us(1);
- boost::chrono::duration<double, boost::milli> ms = us;
- BOOST_TEST(ms.count() == 1./1000);
- return boost::report_errors();
-}
Deleted: sandbox/chrono/libs/chrono/test/duration/cons/default.pass.cpp
==============================================================================
--- sandbox/chrono/libs/chrono/test/duration/cons/default.pass.cpp 2010-11-01 15:16:40 EDT (Mon, 01 Nov 2010)
+++ (empty file)
@@ -1,24 +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
-
-// Rep must be default initialized, not initialized with 0
-
-#include <boost/chrono.hpp>
-#include <boost/detail/lightweight_test.hpp>
-
-#include "../../rep.h"
-
-template <class D>
-void
-test()
-{
- D d;
- BOOST_TEST(d.count() == typename D::rep());
-}
-
-int main()
-{
- test<boost::chrono::duration<Rep> >();
- return boost::report_errors();
-}
Deleted: sandbox/chrono/libs/chrono/test/duration/cons/rep.pass.cpp
==============================================================================
--- sandbox/chrono/libs/chrono/test/duration/cons/rep.pass.cpp 2010-11-01 15:16:40 EDT (Mon, 01 Nov 2010)
+++ (empty file)
@@ -1,25 +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
-
-#include <boost/chrono.hpp>
-#include <boost/detail/lightweight_test.hpp>
-
-#include "../../rep.h"
-
-template <class D, class R>
-void
-test(R r)
-{
- D d(r);
- BOOST_TEST(d.count() == r);
-}
-
-int main()
-{
- test<boost::chrono::duration<int> >(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();
-}
Deleted: sandbox/chrono/libs/chrono/test/duration/cons/rep02.pass.cpp
==============================================================================
--- sandbox/chrono/libs/chrono/test/duration/cons/rep02.pass.cpp 2010-11-01 15:16:40 EDT (Mon, 01 Nov 2010)
+++ (empty file)
@@ -1,15 +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
-
-// construct double with int
-
-#include <boost/chrono.hpp>
-#include <boost/detail/lightweight_test.hpp>
-
-int main()
-{
- boost::chrono::duration<double> d(5);
- BOOST_TEST(d.count() == 5);
- return boost::report_errors();
-}
Deleted: sandbox/chrono/libs/chrono/test/hours.pass.cpp
==============================================================================
--- sandbox/chrono/libs/chrono/test/hours.pass.cpp 2010-11-01 15:16:40 EDT (Mon, 01 Nov 2010)
+++ (empty file)
@@ -1,22 +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
-
-#include <boost/chrono.hpp>
-#include <boost/type_traits.hpp>
-#include <limits>
-
-#if !defined(BOOST_NO_STATIC_ASSERT)
-#define NOTHING ""
-#endif
-
-void test()
-{
- typedef boost::chrono::hours D;
- typedef D::rep Rep;
- typedef D::period Period;
- BOOST_CHRONO_STATIC_ASSERT(boost::is_signed<Rep>::value, NOTHING, ());
- BOOST_CHRONO_STATIC_ASSERT(boost::is_integral<Rep>::value, NOTHING, ());
- BOOST_CHRONO_STATIC_ASSERT(std::numeric_limits<Rep>::digits >= 22, NOTHING, ());
- BOOST_CHRONO_STATIC_ASSERT((boost::is_same<Period, boost::ratio<3600> >::value), NOTHING, ());
-}
Deleted: sandbox/chrono/libs/chrono/test/microseconds.pass.cpp
==============================================================================
--- sandbox/chrono/libs/chrono/test/microseconds.pass.cpp 2010-11-01 15:16:40 EDT (Mon, 01 Nov 2010)
+++ (empty file)
@@ -1,22 +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
-
-#include <boost/chrono.hpp>
-#include <boost/type_traits.hpp>
-#include <limits>
-
-#if !defined(BOOST_NO_STATIC_ASSERT)
-#define NOTHING ""
-#endif
-
-void test()
-{
- typedef boost::chrono::microseconds D;
- typedef D::rep Rep;
- typedef D::period Period;
- BOOST_CHRONO_STATIC_ASSERT(boost::is_signed<Rep>::value, NOTHING, ());
- BOOST_CHRONO_STATIC_ASSERT(boost::is_integral<Rep>::value, NOTHING, ());
- BOOST_CHRONO_STATIC_ASSERT(std::numeric_limits<Rep>::digits >= 54, NOTHING, ());
- BOOST_CHRONO_STATIC_ASSERT((boost::is_same<Period, boost::micro>::value), NOTHING, ());
-}
Deleted: sandbox/chrono/libs/chrono/test/milliseconds.pass.cpp
==============================================================================
--- sandbox/chrono/libs/chrono/test/milliseconds.pass.cpp 2010-11-01 15:16:40 EDT (Mon, 01 Nov 2010)
+++ (empty file)
@@ -1,22 +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
-
-#include <boost/chrono.hpp>
-#include <boost/type_traits.hpp>
-#include <limits>
-
-#if !defined(BOOST_NO_STATIC_ASSERT)
-#define NOTHING ""
-#endif
-
-void test()
-{
- typedef boost::chrono::milliseconds D;
- typedef D::rep Rep;
- typedef D::period Period;
- BOOST_CHRONO_STATIC_ASSERT(boost::is_signed<Rep>::value, NOTHING, ());
- BOOST_CHRONO_STATIC_ASSERT(boost::is_integral<Rep>::value, NOTHING, ());
- BOOST_CHRONO_STATIC_ASSERT(std::numeric_limits<Rep>::digits >= 44, NOTHING, ());
- BOOST_CHRONO_STATIC_ASSERT((boost::is_same<Period, boost::milli>::value), NOTHING, ());
-}
Deleted: sandbox/chrono/libs/chrono/test/minutes.pass.cpp
==============================================================================
--- sandbox/chrono/libs/chrono/test/minutes.pass.cpp 2010-11-01 15:16:40 EDT (Mon, 01 Nov 2010)
+++ (empty file)
@@ -1,22 +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
-
-#include <boost/chrono.hpp>
-#include <boost/type_traits.hpp>
-#include <limits>
-
-#if !defined(BOOST_NO_STATIC_ASSERT)
-#define NOTHING ""
-#endif
-
-void test()
-{
- typedef boost::chrono::minutes D;
- typedef D::rep Rep;
- typedef D::period Period;
- BOOST_CHRONO_STATIC_ASSERT(boost::is_signed<Rep>::value, NOTHING, ());
- BOOST_CHRONO_STATIC_ASSERT(boost::is_integral<Rep>::value, NOTHING, ());
- BOOST_CHRONO_STATIC_ASSERT(std::numeric_limits<Rep>::digits >= 28, NOTHING, ());
- BOOST_CHRONO_STATIC_ASSERT((boost::is_same<Period, boost::ratio<60> >::value), NOTHING, ());
-}
Deleted: sandbox/chrono/libs/chrono/test/nanoseconds.pass.cpp
==============================================================================
--- sandbox/chrono/libs/chrono/test/nanoseconds.pass.cpp 2010-11-01 15:16:40 EDT (Mon, 01 Nov 2010)
+++ (empty file)
@@ -1,22 +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
-
-#include <boost/chrono.hpp>
-#include <boost/type_traits.hpp>
-#include <limits>
-
-#if !defined(BOOST_NO_STATIC_ASSERT)
-#define NOTHING ""
-#endif
-
-void test()
-{
- typedef boost::chrono::nanoseconds D;
- typedef D::rep Rep;
- typedef D::period Period;
- BOOST_CHRONO_STATIC_ASSERT(boost::is_signed<Rep>::value, NOTHING, ());
- BOOST_CHRONO_STATIC_ASSERT(boost::is_integral<Rep>::value, NOTHING, ());
- BOOST_CHRONO_STATIC_ASSERT(std::numeric_limits<Rep>::digits >= 63, NOTHING, ());
- BOOST_CHRONO_STATIC_ASSERT((boost::is_same<Period, boost::nano>::value), NOTHING, ());
-}
Deleted: sandbox/chrono/libs/chrono/test/seconds.pass.cpp
==============================================================================
--- sandbox/chrono/libs/chrono/test/seconds.pass.cpp 2010-11-01 15:16:40 EDT (Mon, 01 Nov 2010)
+++ (empty file)
@@ -1,22 +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
-
-#include <boost/chrono.hpp>
-#include <boost/type_traits.hpp>
-#include <limits>
-
-#if !defined(BOOST_NO_STATIC_ASSERT)
-#define NOTHING ""
-#endif
-
-void test()
-{
- typedef boost::chrono::seconds D;
- typedef D::rep Rep;
- typedef D::period Period;
- BOOST_CHRONO_STATIC_ASSERT(boost::is_signed<Rep>::value, NOTHING, ());
- BOOST_CHRONO_STATIC_ASSERT(boost::is_integral<Rep>::value, NOTHING, ());
- BOOST_CHRONO_STATIC_ASSERT(std::numeric_limits<Rep>::digits >= 34, NOTHING, ());
- BOOST_CHRONO_STATIC_ASSERT((boost::is_same<Period, boost::ratio<1> >::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