|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r69491 - in sandbox/enums/libs/enums/test: . enum_set enum_set/cons
From: vicente.botet_at_[hidden]
Date: 2011-03-02 17:04:31
Author: viboes
Date: 2011-03-02 17:04:29 EST (Wed, 02 Mar 2011)
New Revision: 69491
URL: http://svn.boost.org/trac/boost/changeset/69491
Log:
Enums: Added default constructor pass
Added:
sandbox/enums/libs/enums/test/enum_set/cons/
sandbox/enums/libs/enums/test/enum_set/cons/default.pass.cpp (contents, props changed)
Text files modified:
sandbox/enums/libs/enums/test/Jamfile.v2 | 2 ++
sandbox/enums/libs/enums/test/enum_set/version.pass.cpp | 2 +-
2 files changed, 3 insertions(+), 1 deletions(-)
Modified: sandbox/enums/libs/enums/test/Jamfile.v2
==============================================================================
--- sandbox/enums/libs/enums/test/Jamfile.v2 (original)
+++ sandbox/enums/libs/enums/test/Jamfile.v2 2011-03-02 17:04:29 EST (Wed, 02 Mar 2011)
@@ -72,5 +72,7 @@
test-suite "enum_set"
:
[ run enum_set/version.pass.cpp : : : : enum_set__version__pass ]
+ #[ run enum_set/types.pass.cpp : : : : enum_set__types__pass ]
+ [ run enum_set/cons/default.pass.cpp : : : : enum_set__cons_default__pass ]
;
\ No newline at end of file
Added: sandbox/enums/libs/enums/test/enum_set/cons/default.pass.cpp
==============================================================================
--- (empty file)
+++ sandbox/enums/libs/enums/test/enum_set/cons/default.pass.cpp 2011-03-02 17:04:29 EST (Wed, 02 Mar 2011)
@@ -0,0 +1,56 @@
+//////////////////////////////////////////////////////////////////////////////
+//
+// (C) Copyright Vicente J. Botet Escriba 2011.
+// 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/enums for documentation.
+//
+// Adapted from libcxx tests
+//
+//////////////////////////////////////////////////////////////////////////////
+//===----------------------------------------------------------------------===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// test default ctor
+
+#include "./Ex.hpp"
+#include <boost/enums/enum_set.hpp>
+#include <boost/enums/size.hpp>
+#include <boost/enums/val.hpp>
+#include <boost/detail/lightweight_test.hpp>
+
+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);
+ }
+}
+
+int main()
+{
+ test_default_ctor<EC3>();
+ //~ test_default_ctor<1>();
+ //~ test_default_ctor<31>();
+ //~ test_default_ctor<32>();
+ //~ test_default_ctor<33>();
+ //~ test_default_ctor<63>();
+ //~ test_default_ctor<64>();
+ //~ test_default_ctor<65>();
+ //~ test_default_ctor<1000>();
+ return boost::report_errors();
+}
Modified: sandbox/enums/libs/enums/test/enum_set/version.pass.cpp
==============================================================================
--- sandbox/enums/libs/enums/test/enum_set/version.pass.cpp (original)
+++ sandbox/enums/libs/enums/test/enum_set/version.pass.cpp 2011-03-02 17:04:29 EST (Wed, 02 Mar 2011)
@@ -10,7 +10,7 @@
//
// Adapted from libcxx tests
//
-////////////////////////////////////////////////////////////////////////////////===----------------------------------------------------------------------===//
+//////////////////////////////////////////////////////////////////////////////
//===----------------------------------------------------------------------===//
//
// The LLVM Compiler Infrastructure
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