stdcpp/tsrc/Boost_test/graph/src/copy.cpp
changeset 0 e4d67989cc36
equal deleted inserted replaced
-1:000000000000 0:e4d67989cc36
       
     1 // Copyright (C) Vladimir Prus 2003.
       
     2 // Distributed under the Boost Software License, Version 1.0. (See
       
     3 // accompanying file LICENSE_1_0.txt or copy at
       
     4 // http://www.boost.org/LICENSE_1_0.txt)
       
     5 /*
       
     6  * © Portions copyright (c) 2006-2007 Nokia Corporation.  All rights reserved.
       
     7 */
       
     8 
       
     9 #include <boost/graph/adjacency_list.hpp>
       
    10 #include <boost/graph/copy.hpp>
       
    11 #ifdef __SYMBIAN32__
       
    12 #include "std_log_result.h"
       
    13 #define LOG_FILENAME_LINE __FILE__, __LINE__
       
    14 #endif
       
    15 
       
    16 int failed_tests = 0;
       
    17 using namespace boost;
       
    18 
       
    19 class copier {
       
    20 public:
       
    21     template<class V1, class V2>
       
    22     void operator()(const V1&, const V2&) const {}
       
    23 };
       
    24 
       
    25 int main()
       
    26 {
       
    27     adjacency_list<vecS, vecS, directedS, property<vertex_root_t, int> > g1, g2;
       
    28     adjacency_list<vecS, setS, directedS, property<vertex_index_t, int> > g3;
       
    29 
       
    30     copy_graph(g1, g2);
       
    31     copier c;
       
    32     copy_graph(g3, g1, vertex_copy(c));
       
    33 #ifdef __SYMBIAN32__
       
    34 	if(failed_tests)
       
    35 	{
       
    36 		std_log(LOG_FILENAME_LINE,"Result : Failed"); 
       
    37 		assert_failed = true;
       
    38 	}
       
    39 	else
       
    40 	{
       
    41 		std_log(LOG_FILENAME_LINE,"Result : Passed");
       
    42 	}  
       
    43 	std_log(LOG_FILENAME_LINE,"[End Test Case ]");
       
    44 #endif
       
    45 #ifdef __SYMBIAN32__
       
    46 	testResultXml("copy");
       
    47 	close_log_file();
       
    48 #endif
       
    49 
       
    50 return failed_tests;
       
    51 }