COIN-OR::LEMON - Graph Library

source: lemon-0.x/test/graph_adaptor_test.cc @ 1909:2d806130e700

Last change on this file since 1909:2d806130e700 was 1909:2d806130e700, checked in by Mihaly Barasz, 18 years ago

Undir -> U transition

File size: 2.2 KB
RevLine 
[906]1/* -*- C++ -*-
[1435]2 * test/graph_adaptor_test.cc - Part of LEMON, a generic C++ optimization library
[906]3 *
[1875]4 * Copyright (C) 2006 Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
[1359]5 * (Egervary Research Group on Combinatorial Optimization, EGRES).
[906]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>
[946]18#include<lemon/concept_check.h>
19
[921]20#include<lemon/smart_graph.h>
[959]21#include<lemon/concept/graph.h>
[1909]22#include<lemon/concept/ugraph.h>
[946]23
[921]24#include<lemon/list_graph.h>
25#include<lemon/full_graph.h>
[1401]26#include<lemon/graph_adaptor.h>
[849]27
[870]28#include"test/test_tools.h"
29#include"test/graph_test.h"
[849]30
31/**
32\file
[1401]33This test makes consistency checks of graph adaptors.
[849]34
[878]35\todo More extensive tests are needed
[849]36*/
37
[921]38using namespace lemon;
[959]39using namespace lemon::concept;
[849]40
41
42
43int main()
44{
[946]45  {
[998]46    typedef StaticGraph Graph;
[1401]47    checkConcept<StaticGraph, GraphAdaptor<Graph> >();
[946]48
[1401]49    checkConcept<StaticGraph, RevGraphAdaptor<Graph> >();
[946]50
[1401]51    checkConcept<StaticGraph, SubGraphAdaptor<Graph,
[998]52      Graph::NodeMap<bool> , Graph::EdgeMap<bool> > >();
[1401]53    checkConcept<StaticGraph, NodeSubGraphAdaptor<Graph,
[998]54      Graph::NodeMap<bool> > >();
[1401]55    checkConcept<StaticGraph, EdgeSubGraphAdaptor<Graph,
[998]56      Graph::EdgeMap<bool> > >();
[992]57   
[1401]58    checkConcept<StaticGraph, SubBidirGraphAdaptor<Graph,
[998]59      Graph::EdgeMap<bool>, Graph::EdgeMap<bool> > >();
[1160]60    //    checkConcept<StaticGraph, BidirGraph<Graph> >();
[1401]61    checkConcept<StaticGraph, ResGraphAdaptor<Graph, int,
[998]62      Graph::EdgeMap<int>, Graph::EdgeMap<int> > >();
[946]63
[1401]64    checkConcept<StaticGraph, ErasingFirstGraphAdaptor<Graph,
[998]65      Graph::NodeMap<Graph::Edge> > >();
[1383]66
67    /// \bug why does not compile with StaticGraph
[1909]68    checkConcept<BaseIterableUGraphConcept, UGraphAdaptor<ListGraph> >();
69    checkConcept<IterableUGraphConcept, UGraphAdaptor<ListGraph> >();
70    checkConcept<MappableUGraphConcept, UGraphAdaptor<ListGraph> >();
[946]71  }
[849]72  std::cout << __FILE__ ": All tests passed.\n";
73
74  return 0;
75}
Note: See TracBrowser for help on using the repository browser.