Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r73244 - sandbox/conversion/libs/conversion_ext/test
From: vicente.botet_at_[hidden]
Date: 2011-07-19 17:54:37


Author: viboes
Date: 2011-07-19 17:54:37 EDT (Tue, 19 Jul 2011)
New Revision: 73244
URL: http://svn.boost.org/trac/boost/changeset/73244

Log:
conversion: cleanup
Text files modified:
   sandbox/conversion/libs/conversion_ext/test/Jamfile.v2 | 1
   sandbox/conversion/libs/conversion_ext/test/builtins.cpp | 82 ++++++++++++++++++++--------------------
   sandbox/conversion/libs/conversion_ext/test/extrinsec.cpp | 10 ---
   sandbox/conversion/libs/conversion_ext/test/intrinsec.cpp | 24 +++++-----
   4 files changed, 55 insertions(+), 62 deletions(-)

Modified: sandbox/conversion/libs/conversion_ext/test/Jamfile.v2
==============================================================================
--- sandbox/conversion/libs/conversion_ext/test/Jamfile.v2 (original)
+++ sandbox/conversion/libs/conversion_ext/test/Jamfile.v2 2011-07-19 17:54:37 EDT (Tue, 19 Jul 2011)
@@ -84,7 +84,6 @@
      [ run ../example/no_throw.cpp ]
      [ run ../example/fallback.cpp ]
      [ run ../example/overload.cpp ]
- #[ run ../example/formatted.cpp ]
     ;
 
 

Modified: sandbox/conversion/libs/conversion_ext/test/builtins.cpp
==============================================================================
--- sandbox/conversion/libs/conversion_ext/test/builtins.cpp (original)
+++ sandbox/conversion/libs/conversion_ext/test/builtins.cpp 2011-07-19 17:54:37 EDT (Tue, 19 Jul 2011)
@@ -11,8 +11,8 @@
 
 #include <iostream>
 #include <boost/detail/lightweight_test.hpp>
-#include <boost/conversion/ca_wrapper.hpp>
 #include <boost/conversion/convert_to.hpp>
+#include <boost/conversion/assignable_to.hpp>
 #include <boost/conversion/include.hpp>
 #include <boost/static_assert.hpp>
 
@@ -181,7 +181,7 @@
     boost::conversion::assign_to(l, ul);
 }
 
-void mca_assign_to_with_builtin_types() {
+void lvalue_assign_to_with_builtin_types() {
     char c=0;
     short s=1;
     int i=2;
@@ -191,41 +191,41 @@
     unsigned int ui(i);
     unsigned long ul(l);
 
- boost::conversion::mca(c) = c;
- boost::conversion::mca(c) = s;
- boost::conversion::mca(c) = i;
- boost::conversion::mca(c) = l;
- boost::conversion::mca(c) = uc;
- boost::conversion::mca(c) = us;
- boost::conversion::mca(c) = ui;
- boost::conversion::mca(c) = ul;
-
- boost::conversion::mca(s) = c;
- boost::conversion::mca(s) = s;
- boost::conversion::mca(s) = i;
- boost::conversion::mca(s) = l;
- boost::conversion::mca(s) = uc;
- boost::conversion::mca(s) = us;
- boost::conversion::mca(s) = ui;
- boost::conversion::mca(s) = ul;
-
- boost::conversion::mca(i) = c;
- boost::conversion::mca(i) = s;
- boost::conversion::mca(i) = i;
- boost::conversion::mca(i) = l;
- boost::conversion::mca(i) = uc;
- boost::conversion::mca(i) = us;
- boost::conversion::mca(i) = ui;
- boost::conversion::mca(i) = ul;
-
- boost::conversion::mca(l) = c;
- boost::conversion::mca(l) = s;
- boost::conversion::mca(l) = i;
- boost::conversion::mca(l) = l;
- boost::conversion::mca(l) = uc;
- boost::conversion::mca(l) = us;
- boost::conversion::mca(l) = ui;
- boost::conversion::mca(l) = ul;
+ boost::conversion::lvalue(c) = c;
+ boost::conversion::lvalue(c) = s;
+ boost::conversion::lvalue(c) = i;
+ boost::conversion::lvalue(c) = l;
+ boost::conversion::lvalue(c) = uc;
+ boost::conversion::lvalue(c) = us;
+ boost::conversion::lvalue(c) = ui;
+ boost::conversion::lvalue(c) = ul;
+
+ boost::conversion::lvalue(s) = c;
+ boost::conversion::lvalue(s) = s;
+ boost::conversion::lvalue(s) = i;
+ boost::conversion::lvalue(s) = l;
+ boost::conversion::lvalue(s) = uc;
+ boost::conversion::lvalue(s) = us;
+ boost::conversion::lvalue(s) = ui;
+ boost::conversion::lvalue(s) = ul;
+
+ boost::conversion::lvalue(i) = c;
+ boost::conversion::lvalue(i) = s;
+ boost::conversion::lvalue(i) = i;
+ boost::conversion::lvalue(i) = l;
+ boost::conversion::lvalue(i) = uc;
+ boost::conversion::lvalue(i) = us;
+ boost::conversion::lvalue(i) = ui;
+ boost::conversion::lvalue(i) = ul;
+
+ boost::conversion::lvalue(l) = c;
+ boost::conversion::lvalue(l) = s;
+ boost::conversion::lvalue(l) = i;
+ boost::conversion::lvalue(l) = l;
+ boost::conversion::lvalue(l) = uc;
+ boost::conversion::lvalue(l) = us;
+ boost::conversion::lvalue(l) = ui;
+ boost::conversion::lvalue(l) = ul;
 }
 
 void assign_to_transitive() {
@@ -236,11 +236,11 @@
 
 }
 
-void mca_assign_to_transitive() {
+void lvalue_assign_to_transitive() {
     {
     int a=0; int b=0; int c=0;
 
- boost::conversion::mca(a) = boost::conversion::mca(b) = boost::conversion::mca(c) = 1;
+ boost::conversion::lvalue(a) = boost::conversion::lvalue(b) = boost::conversion::lvalue(c) = 1;
 
     }
 }
@@ -297,9 +297,9 @@
   convert_to_with_builtin_types();
   implicit_convert_to_with_builtin_types();
   assign_to_with_builtin_types();
- mca_assign_to_with_builtin_types();
+ lvalue_assign_to_with_builtin_types();
   assign_to_transitive();
- mca_assign_to_transitive();
+ lvalue_assign_to_transitive();
   fp_convert_to();
   return boost::report_errors();
 }

Modified: sandbox/conversion/libs/conversion_ext/test/extrinsec.cpp
==============================================================================
--- sandbox/conversion/libs/conversion_ext/test/extrinsec.cpp (original)
+++ sandbox/conversion/libs/conversion_ext/test/extrinsec.cpp 2011-07-19 17:54:37 EDT (Tue, 19 Jul 2011)
@@ -11,8 +11,9 @@
 
 #include <boost/conversion/explicit_convert_to.hpp>
 #include <boost/conversion/convert_to.hpp>
+#include <boost/conversion/convertible_from.hpp>
 #include <boost/conversion/assign_to.hpp>
-#include <boost/conversion/ca_wrapper.hpp>
+#include <boost/conversion/assignable_to.hpp>
 #include <boost/conversion/convertible_to.hpp>
 #include <boost/conversion/convertible_from.hpp>
 #include <boost/conversion/assignable_to.hpp>
@@ -302,7 +303,6 @@
   B b;
   A a;
   //assign_to(a, b);
- mca(a)= b;
   lvalue(a)= b;
 }
 
@@ -312,14 +312,9 @@
   B b;
   A a;
   assign_to(a, assign_to(b,c));
- mca(a)= mca(b) = c;
   lvalue(a)= lvalue(b) = c;
 }
 
-void implicit_conversion_via_mca() {
- C c;
- f(mca(c));
-}
 
 void implicit_conversion_via_implicitly() {
   using namespace boost::conversion;
@@ -350,7 +345,6 @@
   explicit_convert_to();
   explicit_assign_to();
   explicit_chain_assign_to();
- implicit_conversion_via_mca();
   implicit_conversion_via_implicitly();
   implicit_conversion_via_convertible_to();
   implicit_conversion_via_sfinae();

Modified: sandbox/conversion/libs/conversion_ext/test/intrinsec.cpp
==============================================================================
--- sandbox/conversion/libs/conversion_ext/test/intrinsec.cpp (original)
+++ sandbox/conversion/libs/conversion_ext/test/intrinsec.cpp 2011-07-19 17:54:37 EDT (Tue, 19 Jul 2011)
@@ -11,7 +11,7 @@
 #include <boost/conversion/explicit_convert_to.hpp>
 #include <boost/conversion/convert_to.hpp>
 #include <boost/conversion/assign_to.hpp>
-#include <boost/conversion/ca_wrapper.hpp>
+#include <boost/conversion/assignable_to.hpp>
 #include <boost/conversion/assignable_to.hpp>
 #include <boost/conversion/convertible_from.hpp>
 #include <iostream>
@@ -233,10 +233,10 @@
     assign_to(aa,a);
     }
 }
-void mca_with_assignemet_operator() {
+void lvalue_with_assignemet_operator() {
     A a(0);
     AA aa(0);
- mca(aa) =a;
+ lvalue(aa) =a;
 }
 
 void assign_to_with_assignemet_operator_and_implicit_constructor() {
@@ -248,14 +248,14 @@
     {
     B b;
     AA aa(1);
- mca(aa)=b;
+ lvalue(aa)=b;
     assign_to(aa,b);
     }
 }
-void mca_with_assignemet_operator_and_implicit_constructor() {
+void lvalue_with_assignemet_operator_and_implicit_constructor() {
     B b;
     AA aa(1);
- mca(aa)=b;
+ lvalue(aa)=b;
 }
 
 void assign_to_with_assignemet_operator_and_conversion_operator() {
@@ -267,15 +267,15 @@
     {
     C c;
     CC cc(1);
- mca(cc)=c;
+ lvalue(cc)=c;
     //assign_to(cc,c);
     }
 }
 
-void mca_with_assignemet_operator_and_conversion_operator() {
+void lvalue_with_assignemet_operator_and_conversion_operator() {
     C c;
     CC cc(1);
- mca(cc)=c;
+ lvalue(cc)=c;
 }
 
 
@@ -288,9 +288,9 @@
   assign_to_with_assignemet_operator();
   assign_to_with_assignemet_operator_and_implicit_constructor();
   assign_to_with_assignemet_operator_and_conversion_operator();
- mca_with_assignemet_operator();
- mca_with_assignemet_operator_and_implicit_constructor();
- mca_with_assignemet_operator_and_conversion_operator();
+ lvalue_with_assignemet_operator();
+ lvalue_with_assignemet_operator_and_implicit_constructor();
+ lvalue_with_assignemet_operator_and_conversion_operator();
 
   return boost::report_errors();
 


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk