1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/test/digraph_test.cc Sun Jan 20 20:43:48 2008 +0100
1.3 @@ -0,0 +1,82 @@
1.4 +/* -*- C++ -*-
1.5 + *
1.6 + * This file is a part of LEMON, a generic C++ optimization library
1.7 + *
1.8 + * Copyright (C) 2003-2007
1.9 + * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
1.10 + * (Egervary Research Group on Combinatorial Optimization, EGRES).
1.11 + *
1.12 + * Permission to use, modify and distribute this software is granted
1.13 + * provided that this copyright notice appears in all copies. For
1.14 + * precise terms see the accompanying LICENSE file.
1.15 + *
1.16 + * This software is provided "AS IS" with no warranty of any kind,
1.17 + * express or implied, and with no claim as to its suitability for any
1.18 + * purpose.
1.19 + *
1.20 + */
1.21 +
1.22 +#include <iostream>
1.23 +#include <vector>
1.24 +
1.25 +#include <lemon/concepts/digraph.h>
1.26 +#include <lemon/list_graph.h>
1.27 +//#include <lemon/smart_graph.h>
1.28 +//#include <lemon/full_graph.h>
1.29 +//#include <lemon/hypercube_graph.h>
1.30 +
1.31 +#include "test_tools.h"
1.32 +#include "digraph_test.h"
1.33 +#include "map_test.h"
1.34 +
1.35 +
1.36 +using namespace lemon;
1.37 +using namespace lemon::concepts;
1.38 +
1.39 +
1.40 +int main() {
1.41 + { // checking digraph components
1.42 + checkConcept<BaseDigraphComponent, BaseDigraphComponent >();
1.43 +
1.44 + checkConcept<IDableDigraphComponent<>,
1.45 + IDableDigraphComponent<> >();
1.46 +
1.47 + checkConcept<IterableDigraphComponent<>,
1.48 + IterableDigraphComponent<> >();
1.49 +
1.50 + checkConcept<MappableDigraphComponent<>,
1.51 + MappableDigraphComponent<> >();
1.52 +
1.53 + }
1.54 + { // checking skeleton digraphs
1.55 + checkConcept<Digraph, Digraph>();
1.56 + }
1.57 + { // checking list digraph
1.58 + checkConcept<Digraph, ListDigraph >();
1.59 + checkConcept<AlterableDigraphComponent<>, ListDigraph>();
1.60 + checkConcept<ExtendableDigraphComponent<>, ListDigraph>();
1.61 + checkConcept<ClearableDigraphComponent<>, ListDigraph>();
1.62 + checkConcept<ErasableDigraphComponent<>, ListDigraph>();
1.63 +
1.64 + checkDigraph<ListDigraph>();
1.65 + checkGraphNodeMap<ListDigraph>();
1.66 + checkGraphArcMap<ListDigraph>();
1.67 + }
1.68 +// { // checking smart digraph
1.69 +// checkConcept<Digraph, SmartDigraph >();
1.70 +
1.71 +// checkDigraph<SmartDigraph>();
1.72 +// checkDigraphNodeMap<SmartDigraph>();
1.73 +// checkDigraphArcMap<SmartDigraph>();
1.74 +// }
1.75 +// { // checking full digraph
1.76 +// checkConcept<Digraph, FullDigraph >();
1.77 +// }
1.78 +// { // checking full digraph
1.79 +// checkConcept<Digraph, HyperCubeDigraph >();
1.80 +// }
1.81 +
1.82 + std::cout << __FILE__ ": All tests passed.\n";
1.83 +
1.84 + return 0;
1.85 +}