From 1a48cd1714f06b86dd68191b5144ca5d0ac6b74a Mon Sep 17 00:00:00 2001 From: Aleksey Gurtovoy Date: Sat, 3 May 2003 04:42:21 +0000 Subject: [PATCH] set stub implementation [SVN r18341] --- test/set.cpp | 59 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 test/set.cpp diff --git a/test/set.cpp b/test/set.cpp new file mode 100644 index 0000000..34d1179 --- /dev/null +++ b/test/set.cpp @@ -0,0 +1,59 @@ + +// + file: libs/mpl/test/set.cpp +// + last modified: 02/may/03 + +// Copyright (c) 2002-03 +// Aleksey Gurtovoy +// +// Permission to use, copy, modify, distribute and sell this software +// and its documentation for any purpose is hereby granted without fee, +// provided that the above copyright notice appears in all copies and +// that both the copyright notice and this permission notice appear in +// supporting documentation. No representations are made about the +// suitability of this software for any purpose. It is provided "as is" +// without express or implied warranty. +// +// See http://www.boost.org/libs/mpl for documentation. + +#include "boost/mpl/set/set0.hpp" +#include "boost/mpl/has_key.hpp" +#include "boost/static_assert.hpp" + +namespace mpl = boost::mpl; + +#define MPL_TEST_CASE( test_name ) void test_name() +#define MPL_TEST_ASSERT( expr ) BOOST_STATIC_ASSERT( expr ) + +struct UDT {}; +struct incomplete; + +MPL_TEST_CASE( empty_set ) +{ + typedef mpl::set0<> s; + + MPL_TEST_ASSERT(( !mpl::has_key::type::value )); + MPL_TEST_ASSERT(( !mpl::has_key::type::value )); + MPL_TEST_ASSERT(( !mpl::has_key::type::value )); + MPL_TEST_ASSERT(( !mpl::has_key::type::value )); + + MPL_TEST_ASSERT(( !mpl::has_key::type::value )); + MPL_TEST_ASSERT(( !mpl::has_key::type::value )); + MPL_TEST_ASSERT(( !mpl::has_key::type::value )); + MPL_TEST_ASSERT(( !mpl::has_key::type::value )); + + MPL_TEST_ASSERT(( !mpl::has_key::type::value )); + MPL_TEST_ASSERT(( !mpl::has_key::type::value )); + MPL_TEST_ASSERT(( !mpl::has_key::type::value )); + + MPL_TEST_ASSERT(( !mpl::has_key::type::value )); + MPL_TEST_ASSERT(( !mpl::has_key::type::value )); + MPL_TEST_ASSERT(( !mpl::has_key::type::value )); + +} + + +int main() +{ + + return 0; +}