First public contribution.
1 //-----------------------------------------------------------------------------
2 // boost-libs variant/test/test6.cpp header file
3 // See http://www.boost.org for updates, documentation, and revision history.
4 //-----------------------------------------------------------------------------
7 // Eric Friedman, Itay Maman
9 // Distributed under the Boost Software License, Version 1.0. (See
10 // accompanying file LICENSE_1_0.txt or copy at
11 // http://www.boost.org/LICENSE_1_0.txt)
13 * © Portions copyright (c) 2006-2007 Nokia Corporation. All rights reserved.
16 #include "boost/test/minimal.hpp"
17 #include "boost/variant.hpp"
23 #include "std_log_result.h"
24 #define LOG_FILENAME_LINE __FILE__, __LINE__
35 std::ostream& operator<<(std::ostream& out, const jac& )
46 variant<jac, int, double*, const double*> v1;
47 variant<int, char, double*, const double*, char*> v2;
51 verify(v1, spec<int>());
52 verify(v2, spec<int>());
54 verify_not(v1, spec<jac>());
55 verify_not(v1, spec<double*>());
56 verify_not(v1, spec<const double*>());
58 verify_not(v2, spec<char>());
59 verify_not(v2, spec<double*>());
60 verify_not(v2, spec<const double*>());
61 verify_not(v2, spec<char*>());
64 variant<jac, const double*> v3;
65 variant<int, unsigned char, double*> v4;
68 verify(v3, spec<jac>());
69 verify(v4, spec<int>());
70 verify_not(v4, spec<unsigned char>());
75 int test_main(int , char* [])
77 std_log(LOG_FILENAME_LINE,"[Test Case for test6]");
80 testResultXml("test6");