First public contribution.
1 //-----------------------------------------------------------------------------
2 // boost-libs variant/test/test4.cpp source 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__
30 typedef variant<std::string, class_a, float> var_type_1;
31 typedef variant<std::string, class_a, short> var_type_2;
35 int test_main(int , char* [])
37 using namespace boost;
38 std_log(LOG_FILENAME_LINE,"[Test Case for test4]");
43 verify(v1, spec<class_a>(), "[V] class_a(5511)");
45 verify(v2, spec<std::string>(), "[V] ");
48 verify(v2, spec<std::string>(), "[V] abcde");
51 verify(v2, spec<class_a>(), "[V] class_a(5511)");
56 testResultXml("test4");
59 return boost::exit_success;