/* -*- mode: C++; indent-tabs-mode: nil; -*-
* This file is a part of LEMON, a generic C++ optimization library.
* Copyright (C) 2003-2011
* Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
* (Egervary Research Group on Combinatorial Optimization, EGRES).
* Permission to use, modify and distribute this software is granted
* provided that this copyright notice appears in all copies. For
* precise terms see the accompanying LICENSE file.
* This software is provided "AS IS" with no warranty of any kind,
* express or implied, and with no claim as to its suitability for any
#include <lemon/list_graph.h>
#include <lemon/lgf_reader.h>
ListDigraph::ArcMap<int> label(d);
std::istringstream input(test_lgf);
check(countNodes(d) == 2,"There should be 2 nodes");
check(countArcs(d) == 2,"There should be 2 arcs");
ListGraph::EdgeMap<int> label(g);
std::istringstream input(test_lgf);
check(countNodes(g) == 2,"There should be 2 nodes");
check(countEdges(g) == 2,"There should be 2 arcs");
std::istringstream input(test_lgf_nomap);
check(countNodes(d) == 2,"There should be 2 nodes");
check(countArcs(d) == 1,"There should be 1 arc");
std::istringstream input(test_lgf_nomap);
check(countNodes(g) == 2,"There should be 2 nodes");
check(countEdges(g) == 1,"There should be 1 edge");
std::istringstream input(test_lgf_bad1);
catch (FormatError& error)
check(ok,"FormatError exception should have occured");
std::istringstream input(test_lgf_bad1);
catch (FormatError& error)
check(ok,"FormatError exception should have occured");
std::istringstream input(test_lgf_bad2);
catch (FormatError& error)
check(ok,"FormatError exception should have occured");
std::istringstream input(test_lgf_bad2);
catch (FormatError& error)
check(ok,"FormatError exception should have occured");