|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r64945 - sandbox/opaque/libs/opaque/test
From: vicente.botet_at_[hidden]
Date: 2010-08-22 05:38:07
Author: viboes
Date: 2010-08-22 05:38:05 EDT (Sun, 22 Aug 2010)
New Revision: 64945
URL: http://svn.boost.org/trac/boost/changeset/64945
Log:
Towards Opaque implementation
Added:
sandbox/opaque/libs/opaque/test/multi_level_conversion.cpp
- copied unchanged from r64944, /sandbox/opaque/libs/opaque/test/two_level_conversion_fails.cpp
Removed:
sandbox/opaque/libs/opaque/test/two_level_conversion_fails.cpp
Text files modified:
sandbox/opaque/libs/opaque/test/Jamfile.v2 | 16 ++++++++--------
1 files changed, 8 insertions(+), 8 deletions(-)
Modified: sandbox/opaque/libs/opaque/test/Jamfile.v2
==============================================================================
--- sandbox/opaque/libs/opaque/test/Jamfile.v2 (original)
+++ sandbox/opaque/libs/opaque/test/Jamfile.v2 2010-08-22 05:38:05 EDT (Sun, 22 Aug 2010)
@@ -27,19 +27,19 @@
# <toolset>msvc:<asynch-exceptions>on
;
+ test-suite "opaque"
+ :
+ [ run test.cpp ]
+ [ run public_opaque_test.cpp ]
+ [ run private_opaque_test.cpp ]
+ [ run multi_level_conversion.cpp ]
+ ;
+
test-suite "compile_fail"
:
- [ run two_level_conversion_fails.cpp ]
[ compile-fail add_siblings_fail.cpp ]
[ compile-fail assign_siblings_fail.cpp ]
[ compile-fail add_pub_siblings_fail.cpp ]
[ compile-fail assign_pub_siblings_fail.cpp ]
;
- test-suite "opaque"
- :
- [ run test.cpp ]
- [ run public_opaque_test.cpp ]
- [ run private_opaque_test.cpp ]
- ;
-
Deleted: sandbox/opaque/libs/opaque/test/two_level_conversion_fails.cpp
==============================================================================
--- sandbox/opaque/libs/opaque/test/two_level_conversion_fails.cpp 2010-08-22 05:38:05 EDT (Sun, 22 Aug 2010)
+++ (empty file)
@@ -1,117 +0,0 @@
-//////////////////////////////////////////////////////////////////////////////
-//
-// (C) Copyright Vicente J. Botet Escriba 2010. Distributed under the Boost
-// Software License, Version 1.0. (See accompanying file
-// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
-//
-// See http://www.boost.org/libs/opaque for documentation.
-//
-//////////////////////////////////////////////////////////////////////////////
-
-#include <boost/opaque/opaque.hpp>
-#include <boost/mpl/assert.hpp>
-#include <boost/type_traits/is_same.hpp>
-#include <boost/mpl/contains.hpp>
-
-#include <boost/test/unit_test.hpp>
-
-using namespace boost;
-using namespace boost::unit_test;
-
-// Listing 7
-BOOST_OPAQUE_PUBLIC_TYPEDEF(double,mass1_leng2_per_time2);
-BOOST_OPAQUE_PUBLIC_TYPEDEF(mass1_leng2_per_time2,energy);
-BOOST_OPAQUE_PUBLIC_TYPEDEF(energy,kinetic_energy);
-BOOST_OPAQUE_PUBLIC_TYPEDEF(energy,potential_energy);
-BOOST_OPAQUE_PUBLIC_TYPEDEF(energy,heat_energy);
-
-BOOST_OPAQUE_STATIC_ASSERT((
- is_same<
- mass1_leng2_per_time2::substituables,
- mpl::vector<double>
- >::value),
- SSSSSSSSSSS,
- (mass1_leng2_per_time2::substituables)
-);
-
-BOOST_OPAQUE_STATIC_ASSERT((
- mpl::contains<
- energy::substituables,
- mass1_leng2_per_time2
- >::value),
- SSSSSSSSSSS,
- (energy::substituables)
-);
-
-BOOST_OPAQUE_STATIC_ASSERT((
- mpl::contains<
- energy::substituables,
- double
- >::value),
- SSSSSSSSSSS,
- (energy::substituables)
-);
-
-BOOST_OPAQUE_STATIC_ASSERT((
- mpl::contains<
- potential_energy::substituables,
- energy
- >::value),
- SSSSSSSSSSS,
- (potential_energy::substituables)
-);
-
-BOOST_OPAQUE_STATIC_ASSERT((
- mpl::contains<
- potential_energy::substituables,
- mass1_leng2_per_time2
- >::value),
- SSSSSSSSSSS,
- (potential_energy::substituables)
-);
-
-BOOST_OPAQUE_STATIC_ASSERT((
- mpl::contains<
- potential_energy::substituables,
- double
- >::value),
- SSSSSSSSSSS,
- (potential_energy::substituables)
-);
-
-void public_multiple_levels_fail() {
- {
- double d=1;
- mass1_leng2_per_time2 x(d);
- energy e(d);
- potential_energy p(d);
-
- x = e;
- e = p;
- x = p; // 2 levels
- d = p; // 3 levels
- }
-#if 1
- {
- int d=1;
- mass1_leng2_per_time2 x(d);
- energy e(d);
- potential_energy p(d);
-
- x = e;
- e = p;
- x = p; // 2 levels
- d = p; // 3 levels
- }
-#endif
-}
-
-
-test_suite* init_unit_test_suite(int, char*[])
-{
- test_suite* test = BOOST_TEST_SUITE("public_multiple_levels");
- test->add(BOOST_TEST_CASE(&public_multiple_levels_fail));
-
- return test;
-}
-
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