sl@0: //----------------------------------------------------------------------------- sl@0: // boost-libs variant/test/test4.cpp source file sl@0: // See http://www.boost.org for updates, documentation, and revision history. sl@0: //----------------------------------------------------------------------------- sl@0: // sl@0: // Copyright (c) 2003 sl@0: // Eric Friedman, Itay Maman sl@0: // sl@0: // Distributed under the Boost Software License, Version 1.0. (See sl@0: // accompanying file LICENSE_1_0.txt or copy at sl@0: // http://www.boost.org/LICENSE_1_0.txt) sl@0: /* sl@0: * © Portions copyright (c) 2006-2007 Nokia Corporation. All rights reserved. sl@0: */ sl@0: sl@0: #include "boost/test/minimal.hpp" sl@0: #include "boost/variant.hpp" sl@0: sl@0: #include "jobs.h" sl@0: sl@0: #include sl@0: #ifdef __SYMBIAN32__ sl@0: #include "std_log_result.h" sl@0: #define LOG_FILENAME_LINE __FILE__, __LINE__ sl@0: #endif sl@0: struct class_a; sl@0: sl@0: using boost::variant; sl@0: sl@0: typedef variant var_type_1; sl@0: typedef variant var_type_2; sl@0: sl@0: #include "class_a.h" sl@0: sl@0: int test_main(int , char* []) sl@0: { sl@0: using namespace boost; sl@0: std_log(LOG_FILENAME_LINE,"[Test Case for test4]"); sl@0: var_type_1 v1; sl@0: var_type_2 v2; sl@0: sl@0: v1 = class_a(); sl@0: verify(v1, spec(), "[V] class_a(5511)"); sl@0: sl@0: verify(v2, spec(), "[V] "); sl@0: sl@0: v2 = "abcde"; sl@0: verify(v2, spec(), "[V] abcde"); sl@0: sl@0: v2 = v1; sl@0: verify(v2, spec(), "[V] class_a(5511)"); sl@0: sl@0: v2 = 5; sl@0: v1 = v2; sl@0: #ifdef __SYMBIAN32__ sl@0: testResultXml("test4"); sl@0: close_log_file(); sl@0: #endif sl@0: return boost::exit_success; sl@0: }