| ... | ... |
@@ -96,49 +96,49 @@ |
| 96 | 96 |
ListDigraph d; |
| 97 | 97 |
std::istringstream input(test_lgf_nomap); |
| 98 | 98 |
digraphReader(d, input). |
| 99 | 99 |
run(); |
| 100 | 100 |
check(countNodes(d) == 2,"There should be 2 nodes"); |
| 101 | 101 |
check(countArcs(d) == 1,"There should be 1 arc"); |
| 102 | 102 |
} |
| 103 | 103 |
{
|
| 104 | 104 |
ListGraph g; |
| 105 | 105 |
std::istringstream input(test_lgf_nomap); |
| 106 | 106 |
graphReader(g, input). |
| 107 | 107 |
run(); |
| 108 | 108 |
check(countNodes(g) == 2,"There should be 2 nodes"); |
| 109 | 109 |
check(countEdges(g) == 1,"There should be 1 edge"); |
| 110 | 110 |
} |
| 111 | 111 |
|
| 112 | 112 |
{
|
| 113 | 113 |
ListDigraph d; |
| 114 | 114 |
std::istringstream input(test_lgf_bad1); |
| 115 | 115 |
bool ok=false; |
| 116 | 116 |
try {
|
| 117 | 117 |
digraphReader(d, input). |
| 118 | 118 |
run(); |
| 119 | 119 |
} |
| 120 |
catch (FormatError&) |
|
| 120 |
catch (FormatError&) |
|
| 121 | 121 |
{
|
| 122 | 122 |
ok = true; |
| 123 | 123 |
} |
| 124 | 124 |
check(ok,"FormatError exception should have occured"); |
| 125 | 125 |
} |
| 126 | 126 |
{
|
| 127 | 127 |
ListGraph g; |
| 128 | 128 |
std::istringstream input(test_lgf_bad1); |
| 129 | 129 |
bool ok=false; |
| 130 | 130 |
try {
|
| 131 | 131 |
graphReader(g, input). |
| 132 | 132 |
run(); |
| 133 | 133 |
} |
| 134 | 134 |
catch (FormatError&) |
| 135 | 135 |
{
|
| 136 | 136 |
ok = true; |
| 137 | 137 |
} |
| 138 | 138 |
check(ok,"FormatError exception should have occured"); |
| 139 | 139 |
} |
| 140 | 140 |
|
| 141 | 141 |
{
|
| 142 | 142 |
ListDigraph d; |
| 143 | 143 |
std::istringstream input(test_lgf_bad2); |
| 144 | 144 |
bool ok=false; |
| 1 | 1 |
/* -*- mode: C++; indent-tabs-mode: nil; -*- |
| 2 | 2 |
* |
| 3 | 3 |
* This file is a part of LEMON, a generic C++ optimization library. |
| 4 | 4 |
* |
| 5 |
* Copyright (C) 2003- |
|
| 5 |
* Copyright (C) 2003-2011 |
|
| 6 | 6 |
* Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport |
| 7 | 7 |
* (Egervary Research Group on Combinatorial Optimization, EGRES). |
| 8 | 8 |
* |
| 9 | 9 |
* Permission to use, modify and distribute this software is granted |
| 10 | 10 |
* provided that this copyright notice appears in all copies. For |
| 11 | 11 |
* precise terms see the accompanying LICENSE file. |
| 12 | 12 |
* |
| 13 | 13 |
* This software is provided "AS IS" with no warranty of any kind, |
| 14 | 14 |
* express or implied, and with no claim as to its suitability for any |
| 15 | 15 |
* purpose. |
| 16 | 16 |
* |
| 17 | 17 |
*/ |
| 18 | 18 |
|
| 19 | 19 |
#include <sstream> |
| 20 | 20 |
#include <lemon/lp_skeleton.h> |
| 21 | 21 |
#include "test_tools.h" |
| 22 | 22 |
#include <lemon/tolerance.h> |
| 23 | 23 |
|
| 24 | 24 |
#include <lemon/config.h> |
| 25 | 25 |
|
| 26 | 26 |
#ifdef LEMON_HAVE_GLPK |
| 27 | 27 |
#include <lemon/glpk.h> |
| 28 | 28 |
#endif |
| 29 | 29 |
|
0 comments (0 inline)