Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r69524 - in sandbox/enums/libs/enums/test: . enum_set/cons
From: vicente.botet_at_[hidden]
Date: 2011-03-03 13:05:53


Author: viboes
Date: 2011-03-03 13:05:52 EST (Thu, 03 Mar 2011)
New Revision: 69524
URL: http://svn.boost.org/trac/boost/changeset/69524

Log:
Enums: warning removal
Text files modified:
   sandbox/enums/libs/enums/test/constructible_from_enum.cpp | 1 +
   sandbox/enums/libs/enums/test/construction_from_int_fails.cpp | 3 ++-
   sandbox/enums/libs/enums/test/enum_set/cons/default.pass.cpp | 15 +++++++++------
   sandbox/enums/libs/enums/test/implicit_conversion_to_ut_fails.cpp | 1 +
   4 files changed, 13 insertions(+), 7 deletions(-)

Modified: sandbox/enums/libs/enums/test/constructible_from_enum.cpp
==============================================================================
--- sandbox/enums/libs/enums/test/constructible_from_enum.cpp (original)
+++ sandbox/enums/libs/enums/test/constructible_from_enum.cpp 2011-03-03 13:05:52 EST (Thu, 03 Mar 2011)
@@ -18,6 +18,7 @@
 
   { // Constructible from enum
     EnumClass e(EnumClass::Enum2);
+ BOOST_TEST(e==EnumClass::Enum2);
   }
   { // copy constructor emulation
     EnumClass e1=boost::convert_to<EnumClass>(EnumClass::Enum2);

Modified: sandbox/enums/libs/enums/test/construction_from_int_fails.cpp
==============================================================================
--- sandbox/enums/libs/enums/test/construction_from_int_fails.cpp (original)
+++ sandbox/enums/libs/enums/test/construction_from_int_fails.cpp 2011-03-03 13:05:52 EST (Thu, 03 Mar 2011)
@@ -16,5 +16,6 @@
 
   // Construction from int compile fails
   EnumClass e(0);
-
+ (void)e;
+
 }

Modified: sandbox/enums/libs/enums/test/enum_set/cons/default.pass.cpp
==============================================================================
--- sandbox/enums/libs/enums/test/enum_set/cons/default.pass.cpp (original)
+++ sandbox/enums/libs/enums/test/enum_set/cons/default.pass.cpp 2011-03-03 13:05:52 EST (Thu, 03 Mar 2011)
@@ -27,18 +27,21 @@
 #include <boost/enums/size.hpp>
 #include <boost/enums/val.hpp>
 #include <boost/detail/lightweight_test.hpp>
+#include <iostream>
 
 using namespace boost::enums;
 
 template <typename EC>
 void test_default_ctor()
 {
- {
- enum_set<EC> v1;
- BOOST_TEST(v1.size() == meta::size<EC>::value);
- for (std::size_t i = 0; i < meta::size<EC>::value; ++i)
- BOOST_TEST(v1[val<EC>(i)] == false);
- }
+
+ enum_set<EC> v1;
+ BOOST_TEST(v1.size() == meta::size<EC>::value);
+ for (std::size_t i = 0; i < meta::size<EC>::value; ++i)
+ {
+ BOOST_TEST(v1[val<EC>(i)] == false);
+ }
+
 }
 
 int main()

Modified: sandbox/enums/libs/enums/test/implicit_conversion_to_ut_fails.cpp
==============================================================================
--- sandbox/enums/libs/enums/test/implicit_conversion_to_ut_fails.cpp (original)
+++ sandbox/enums/libs/enums/test/implicit_conversion_to_ut_fails.cpp 2011-03-03 13:05:52 EST (Thu, 03 Mar 2011)
@@ -21,6 +21,7 @@
     EnumClass e ;
     f(e); // error
     int i = e; // error
+ (void)i;
   }
 
 }


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