sl@0: //----------------------------------------------------------------------------- sl@0: // boost-libs variant/test/test6.cpp header 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 sl@0: sl@0: #include "jobs.h" sl@0: #ifdef __SYMBIAN32__ sl@0: #include "std_log_result.h" sl@0: #define LOG_FILENAME_LINE __FILE__, __LINE__ sl@0: #endif sl@0: sl@0: //Just Another Class sl@0: struct jac sl@0: { sl@0: jac() { } sl@0: jac(int ) { } sl@0: jac(const char* ) { } sl@0: }; sl@0: sl@0: std::ostream& operator<<(std::ostream& out, const jac& ) sl@0: { sl@0: out << "jac "; sl@0: return out; sl@0: } sl@0: sl@0: sl@0: void run() sl@0: { sl@0: using boost::variant; sl@0: sl@0: variant v1; sl@0: variant v2; sl@0: sl@0: v1 = v2; sl@0: sl@0: verify(v1, spec()); sl@0: verify(v2, spec()); sl@0: sl@0: verify_not(v1, spec()); sl@0: verify_not(v1, spec()); sl@0: verify_not(v1, spec()); sl@0: sl@0: verify_not(v2, spec()); sl@0: verify_not(v2, spec()); sl@0: verify_not(v2, spec()); sl@0: verify_not(v2, spec()); sl@0: sl@0: sl@0: variant v3; sl@0: variant v4; sl@0: sl@0: v3 = v4; sl@0: verify(v3, spec()); sl@0: verify(v4, spec()); sl@0: verify_not(v4, spec()); sl@0: } sl@0: sl@0: sl@0: sl@0: int test_main(int , char* []) sl@0: { sl@0: std_log(LOG_FILENAME_LINE,"[Test Case for test6]"); sl@0: run(); sl@0: #ifdef __SYMBIAN32__ sl@0: testResultXml("test6"); sl@0: close_log_file(); sl@0: #endif sl@0: return 0; sl@0: } sl@0: