|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r69079 - in sandbox/opaque/libs/opaque/test: . new_class
From: vicente.botet_at_[hidden]
Date: 2011-02-20 11:07:29
Author: viboes
Date: 2011-02-20 11:07:19 EST (Sun, 20 Feb 2011)
New Revision: 69079
URL: http://svn.boost.org/trac/boost/changeset/69079
Log:
Opaque: Fix error signaled by a warning
Text files modified:
sandbox/opaque/libs/opaque/test/Jamfile.v2 | 23 ++++++++++++-----------
sandbox/opaque/libs/opaque/test/new_class/using_divide_pass.cpp | 26 +++++++++++++-------------
sandbox/opaque/libs/opaque/test/new_class/using_minus_assign_pass.cpp | 28 ++++++++++++++--------------
sandbox/opaque/libs/opaque/test/new_class/using_multiply_assign_pass.cpp | 26 +++++++++++++-------------
sandbox/opaque/libs/opaque/test/new_class/using_multiply_pass.cpp | 26 +++++++++++++-------------
sandbox/opaque/libs/opaque/test/new_class/using_plus_assign_pass.cpp | 26 +++++++++++++-------------
sandbox/opaque/libs/opaque/test/new_class/using_plus_pass.cpp | 26 +++++++++++++-------------
7 files changed, 91 insertions(+), 90 deletions(-)
Modified: sandbox/opaque/libs/opaque/test/Jamfile.v2
==============================================================================
--- sandbox/opaque/libs/opaque/test/Jamfile.v2 (original)
+++ sandbox/opaque/libs/opaque/test/Jamfile.v2 2011-02-20 11:07:19 EST (Sun, 20 Feb 2011)
@@ -7,9 +7,6 @@
# See library home page at http://www.boost.org/libs/opaque
-# uncomment one if the above lines if you build outside the Boost release
-#local BOOST_ROOT = /boost_1_41_0 ;
-#local BOOST_ROOT = c:/cygwin/boost_1_41_0 ;
if ! $(BOOST_ROOT)
{
@@ -19,22 +16,26 @@
project
: requirements
- # uncomment the line above if you build outside the Boost release
+ # uncomment the line above if you build outside a Boost release
#<include>$(BOOST_ROOT)
- # uncomment the line above if you build outside the Boost release
- #<include>../../..
-# <toolset>msvc:<asynch-exceptions>on
+
<define>BOOST_ENABLE_WARNINGS
<define>BOOST_RATIO_USES_MPL_ASSERT
<warnings>all
<toolset>gcc:<cxxflags>-Wextra
+ <toolset>gcc:<cxxflags>-pedantic
<toolset>gcc:<cxxflags>-Wno-long-long
+ <toolset>darwin:<cxxflags>-Wextra
+ <toolset>darwin:<cxxflags>-pedantic
+ <toolset>darwin:<cxxflags>-Wno-long-long
+ #<toolset>pathscale:<cxxflags>-Wextra
+ <toolset>pathscale:<cxxflags>-Wno-long-long
+ <toolset>pathscale:<cxxflags>-pedantic
+ <toolset>clang:<cxxflags>-Wextra
+ <toolset>clang:<cxxflags>-pedantic
+ <toolset>clang:<cxxflags>-Wno-long-long
<toolset>gcc-mingw-4.5.0:<cxxflags>-Wno-missing-field-initializers
- #<toolset>gcc-mingw-4.5.0:<cxxflags>-Wnon-template-friend
- #<toolset>gcc-mingw-4.5.0:<cxxflags>-Wno-non-template-friend
<toolset>gcc-mingw-4.5.0:<cxxflags>-fdiagnostics-show-option
- #<toolset>gcc-3.4.4:<cxxflags>-Wno-non-template-friend
- #<toolset>gcc-4.3.4:<cxxflags>-Wno-non-template-friend
<toolset>msvc:<cxxflags>/wd4127
;
Modified: sandbox/opaque/libs/opaque/test/new_class/using_divide_pass.cpp
==============================================================================
--- sandbox/opaque/libs/opaque/test/new_class/using_divide_pass.cpp (original)
+++ sandbox/opaque/libs/opaque/test/new_class/using_divide_pass.cpp 2011-02-20 11:07:19 EST (Sun, 20 Feb 2011)
@@ -19,29 +19,29 @@
typedef short UT2;
// NEW_CLASS(NT,UT,(opaque::using_divide))
-struct NT :
+struct NT :
boost::opaque::new_class<NT, UT
, boost::mpl::vector<
- boost::opaque::using_divide
+ boost::opaque::using_divide
>
>
{
- typedef
+ typedef
boost::opaque::new_class<NT, UT
, boost::mpl::vector<
- boost::opaque::using_divide
+ boost::opaque::using_divide
>
>
base_type;
-
- NT(){}
+
+ NT(){}
explicit NT(unsigned v) : base_type(v) {}
- template <typename W>
- explicit NT(W w)
- : base_type(w)
+ template <typename W>
+ explicit NT(W w)
+ : base_type(w)
{}
- NT(NT const& r)
- : base_type(r.val_)
+ NT(NT const& r)
+ : base_type(r.val_)
{}
};
@@ -85,7 +85,7 @@
void divide_test() {
NT a2(2), b3(3), c6(6);
a2 = c6 / b3;
- BOOST_TEST(a2.underlying()=2);
+ BOOST_TEST(a2.underlying()==2);
}
int main()
@@ -99,7 +99,7 @@
copy_constructor_test();
assign_test();
opaque_static_cast_test();
-#endif
+#endif
divide_test();
return boost::report_errors();
Modified: sandbox/opaque/libs/opaque/test/new_class/using_minus_assign_pass.cpp
==============================================================================
--- sandbox/opaque/libs/opaque/test/new_class/using_minus_assign_pass.cpp (original)
+++ sandbox/opaque/libs/opaque/test/new_class/using_minus_assign_pass.cpp 2011-02-20 11:07:19 EST (Sun, 20 Feb 2011)
@@ -19,29 +19,29 @@
typedef short UT2;
// NEW_CLASS(NT,UT,(opaque::using_minus_assign))
-struct NT :
+struct NT :
boost::opaque::new_class<NT, UT
, boost::mpl::vector<
- boost::opaque::using_minus_assign
+ boost::opaque::using_minus_assign
>
>
{
- typedef
+ typedef
boost::opaque::new_class<NT, UT
, boost::mpl::vector<
- boost::opaque::using_minus_assign
+ boost::opaque::using_minus_assign
>
>
base_type;
-
- NT(){}
+
+ NT(){}
explicit NT(unsigned v) : base_type(v) {}
- template <typename W>
- explicit NT(W w)
- : base_type(w)
+ template <typename W>
+ explicit NT(W w)
+ : base_type(w)
{}
- NT(NT const& r)
- : base_type(r.val_)
+ NT(NT const& r)
+ : base_type(r.val_)
{}
};
@@ -85,7 +85,7 @@
void minus_assign_test() {
NT a1(1), b2(2), c2(2);
a1-=b2;
- BOOST_TEST(a1.underlying()=3);
+ BOOST_TEST(a1.underlying()==-1);
}
int main()
@@ -99,8 +99,8 @@
copy_constructor_test();
assign_test();
opaque_static_cast_test();
-#endif
-
+#endif
+
minus_assign_test();
return boost::report_errors();
Modified: sandbox/opaque/libs/opaque/test/new_class/using_multiply_assign_pass.cpp
==============================================================================
--- sandbox/opaque/libs/opaque/test/new_class/using_multiply_assign_pass.cpp (original)
+++ sandbox/opaque/libs/opaque/test/new_class/using_multiply_assign_pass.cpp 2011-02-20 11:07:19 EST (Sun, 20 Feb 2011)
@@ -19,29 +19,29 @@
typedef short UT2;
// NEW_CLASS(NT,UT,(opaque::using_multiply_assign))
-struct NT :
+struct NT :
boost::opaque::new_class<NT, UT
, boost::mpl::vector<
- boost::opaque::using_multiply_assign
+ boost::opaque::using_multiply_assign
>
>
{
- typedef
+ typedef
boost::opaque::new_class<NT, UT
, boost::mpl::vector<
- boost::opaque::using_multiply_assign
+ boost::opaque::using_multiply_assign
>
>
base_type;
-
- NT(){}
+
+ NT(){}
explicit NT(unsigned v) : base_type(v) {}
- template <typename W>
- explicit NT(W w)
- : base_type(w)
+ template <typename W>
+ explicit NT(W w)
+ : base_type(w)
{}
- NT(NT const& r)
- : base_type(r.val_)
+ NT(NT const& r)
+ : base_type(r.val_)
{}
};
@@ -85,7 +85,7 @@
void multiply_assign_test() {
NT a1(2), b2(3);
a1 *= b2;
- BOOST_TEST(a1.underlying()=6);
+ BOOST_TEST(a1.underlying()==6);
}
int main()
@@ -99,7 +99,7 @@
copy_constructor_test();
assign_test();
opaque_static_cast_test();
-#endif
+#endif
multiply_assign_test();
return boost::report_errors();
Modified: sandbox/opaque/libs/opaque/test/new_class/using_multiply_pass.cpp
==============================================================================
--- sandbox/opaque/libs/opaque/test/new_class/using_multiply_pass.cpp (original)
+++ sandbox/opaque/libs/opaque/test/new_class/using_multiply_pass.cpp 2011-02-20 11:07:19 EST (Sun, 20 Feb 2011)
@@ -19,29 +19,29 @@
typedef short UT2;
// NEW_CLASS(NT,UT,(opaque::using_multiply))
-struct NT :
+struct NT :
boost::opaque::new_class<NT, UT
, boost::mpl::vector<
- boost::opaque::using_multiply
+ boost::opaque::using_multiply
>
>
{
- typedef
+ typedef
boost::opaque::new_class<NT, UT
, boost::mpl::vector<
- boost::opaque::using_multiply
+ boost::opaque::using_multiply
>
>
base_type;
-
- NT(){}
+
+ NT(){}
explicit NT(unsigned v) : base_type(v) {}
- template <typename W>
- explicit NT(W w)
- : base_type(w)
+ template <typename W>
+ explicit NT(W w)
+ : base_type(w)
{}
- NT(NT const& r)
- : base_type(r.val_)
+ NT(NT const& r)
+ : base_type(r.val_)
{}
};
@@ -85,7 +85,7 @@
void multiply_test() {
NT a2(2), b3(3), c6(2);
c6 = a2 * b3;
- BOOST_TEST(c6.underlying()=6);
+ BOOST_TEST(c6.underlying()==6);
}
int main()
@@ -99,7 +99,7 @@
copy_constructor_test();
assign_test();
opaque_static_cast_test();
-#endif
+#endif
multiply_test();
return boost::report_errors();
Modified: sandbox/opaque/libs/opaque/test/new_class/using_plus_assign_pass.cpp
==============================================================================
--- sandbox/opaque/libs/opaque/test/new_class/using_plus_assign_pass.cpp (original)
+++ sandbox/opaque/libs/opaque/test/new_class/using_plus_assign_pass.cpp 2011-02-20 11:07:19 EST (Sun, 20 Feb 2011)
@@ -19,29 +19,29 @@
typedef short UT2;
// NEW_CLASS(NT,UT,(opaque::using_plus_assign))
-struct NT :
+struct NT :
boost::opaque::new_class<NT, UT
, boost::mpl::vector<
- boost::opaque::using_plus_assign
+ boost::opaque::using_plus_assign
>
>
{
- typedef
+ typedef
boost::opaque::new_class<NT, UT
, boost::mpl::vector<
- boost::opaque::using_plus_assign
+ boost::opaque::using_plus_assign
>
>
base_type;
-
- NT(){}
+
+ NT(){}
explicit NT(unsigned v) : base_type(v) {}
- template <typename W>
- explicit NT(W w)
- : base_type(w)
+ template <typename W>
+ explicit NT(W w)
+ : base_type(w)
{}
- NT(NT const& r)
- : base_type(r.val_)
+ NT(NT const& r)
+ : base_type(r.val_)
{}
};
@@ -85,7 +85,7 @@
void plus_assign_test() {
NT a1(1), b2(2), c2(2);
a1+=b2;
- BOOST_TEST(a1.underlying()=3);
+ BOOST_TEST(a1.underlying()==3);
}
int main()
@@ -98,7 +98,7 @@
copy_constructor_test();
assign_test();
opaque_static_cast_test();
-#endif
+#endif
plus_assign_test();
return boost::report_errors();
Modified: sandbox/opaque/libs/opaque/test/new_class/using_plus_pass.cpp
==============================================================================
--- sandbox/opaque/libs/opaque/test/new_class/using_plus_pass.cpp (original)
+++ sandbox/opaque/libs/opaque/test/new_class/using_plus_pass.cpp 2011-02-20 11:07:19 EST (Sun, 20 Feb 2011)
@@ -19,29 +19,29 @@
typedef short UT2;
// NEW_CLASS(NT,UT,(opaque::using_plus))
-struct NT :
+struct NT :
boost::opaque::new_class<NT, UT
, boost::mpl::vector<
- boost::opaque::using_plus
+ boost::opaque::using_plus
>
>
{
- typedef
+ typedef
boost::opaque::new_class<NT, UT
, boost::mpl::vector<
- boost::opaque::using_plus
+ boost::opaque::using_plus
>
>
base_type;
-
- NT(){}
+
+ NT(){}
explicit NT(unsigned v) : base_type(v) {}
- template <typename W>
- explicit NT(W w)
- : base_type(w)
+ template <typename W>
+ explicit NT(W w)
+ : base_type(w)
{}
- NT(NT const& r)
- : base_type(r.val_)
+ NT(NT const& r)
+ : base_type(r.val_)
{}
};
@@ -85,7 +85,7 @@
void plus_test() {
NT a2, b3(3), c6(6);
a2 = c6 + b3;
- BOOST_TEST(a2.underlying()=9);
+ BOOST_TEST(a2.underlying()==9);
}
int main()
@@ -99,7 +99,7 @@
copy_constructor_test();
assign_test();
opaque_static_cast_test();
-#endif
+#endif
plus_test();
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