COIN-OR::LEMON - Graph Library

source: lemon-0.x/src/test/graph_wrapper_test.cc @ 930:e89f3bd26fd4

Last change on this file since 930:e89f3bd26fd4 was 921:818510fa3d99, checked in by Alpar Juttner, 20 years ago

hugo -> lemon

File size: 2.5 KB
RevLine 
[906]1/* -*- C++ -*-
[921]2 * src/test/graph_wrapper_test.cc - Part of LEMON, a generic C++ optimization library
[906]3 *
4 * Copyright (C) 2004 Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
5 * (Egervary Combinatorial Optimization Research Group, EGRES).
6 *
7 * Permission to use, modify and distribute this software is granted
8 * provided that this copyright notice appears in all copies. For
9 * precise terms see the accompanying LICENSE file.
10 *
11 * This software is provided "AS IS" with no warranty of any kind,
12 * express or implied, and with no claim as to its suitability for any
13 * purpose.
14 *
15 */
16
[849]17#include<iostream>
[921]18#include<lemon/smart_graph.h>
19#include<lemon/skeletons/graph.h>
20#include<lemon/list_graph.h>
21#include<lemon/full_graph.h>
22#include<lemon/graph_wrapper.h>
[849]23
[870]24#include"test/test_tools.h"
25#include"test/graph_test.h"
[849]26
27/**
28\file
[878]29This test makes consistency checks of graph wrappers.
[849]30
[878]31\todo More extensive tests are needed
[849]32*/
33
[921]34using namespace lemon;
[849]35
36
37typedef SmartGraph Graph;
[891]38
39//Compile GraphWrapper
[849]40typedef GraphWrapper<Graph> GW;
41template void checkCompileStaticGraph<GW>(GW &);
42
[891]43//Compile RevGraphWrapper
[849]44typedef RevGraphWrapper<Graph> RevGW;
45template void checkCompileStaticGraph<RevGW>(RevGW &);
[891]46
47//Compile SubGraphWrapper
48typedef SubGraphWrapper<Graph, Graph::NodeMap<bool>,
49                        Graph::EdgeMap<bool> > SubGW;
50template void checkCompileStaticGraph<SubGW>(SubGW &);
51
52//Compile UndirGraphWrapper
53/// \bug UndirGraphWrapper cannot pass the StaticGraph test
54//typedef UndirGraphWrapper<Graph> UndirGW;
55//template void checkCompileStaticGraph<UndirGW>(UndirGW &);
56
57//Compile UndirGraph
58//typedef UndirGraph<Graph> UndirG;
59//template void checkCompileStaticGraph<UndirG>(UndirG &);
60
[892]61//Compile SubBidirGraphWrapper
62typedef SubBidirGraphWrapper<Graph, Graph::EdgeMap<bool>,
63                             Graph::EdgeMap<bool> > SubBDGW;
64template void checkCompileStaticGraph<SubBDGW>(SubBDGW &);
[891]65
66//Compile BidirGraphWrapper
[892]67typedef BidirGraphWrapper<Graph> BidirGW;
68template void checkCompileStaticGraph<BidirGW>(BidirGW &);
[891]69
70//Compile BidirGraph
[892]71typedef BidirGraph<Graph> BidirG;
72template void checkCompileStaticGraph<BidirG>(BidirG &);
[891]73
74//Compile ResGraphWrapper
[892]75typedef ResGraphWrapper<Graph, int, Graph::EdgeMap<int>,
76                        Graph::EdgeMap<int> > ResGW;
77template void checkCompileStaticGraph<ResGW>(ResGW &);
[891]78
79//Compile ErasingFirstGraphWrapper
80typedef ErasingFirstGraphWrapper<Graph, Graph::NodeMap<Graph::Edge> > ErasingFirstGW;
81template void checkCompileStaticGraph<ErasingFirstGW>(ErasingFirstGW &);
[849]82
83
84int main()
85{
86  std::cout << __FILE__ ": All tests passed.\n";
87
88  return 0;
89}
Note: See TracBrowser for help on using the repository browser.