From 1658f1fba99e46a78bb251617483fdb43f12a3f6 Mon Sep 17 00:00:00 2001
From: Jan Travnicek <Jan.Travnicek@fit.cvut.cz>
Date: Wed, 1 Jul 2015 00:03:59 +0200
Subject: [PATCH] test outputs

---
 alib2algo/test-src/graph/shortestpath/BellmanFordTest.cpp | 3 +++
 alib2data/src/graph/directed/DirectedEdge.cpp             | 2 +-
 alib2data/src/graph/undirected/UndirectedEdge.cpp         | 2 +-
 3 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/alib2algo/test-src/graph/shortestpath/BellmanFordTest.cpp b/alib2algo/test-src/graph/shortestpath/BellmanFordTest.cpp
index cfb2a04f2c..68614dfe32 100644
--- a/alib2algo/test-src/graph/shortestpath/BellmanFordTest.cpp
+++ b/alib2algo/test-src/graph/shortestpath/BellmanFordTest.cpp
@@ -129,6 +129,9 @@ void GraphBellmanFordTest::testMultiEdge()
 
 	res = graph::shortestpath::BellmanFord::bellmanford(dg, n1);
 
+	std::cout << res << std::endl;
+	std::cout << dg.getEdges() << std::endl;
+
 	CPPUNIT_ASSERT_EQUAL(0, res[n1]);
 	CPPUNIT_ASSERT_EQUAL(1, res[n2]);
 	CPPUNIT_ASSERT_EQUAL(2, res[n3]);
diff --git a/alib2data/src/graph/directed/DirectedEdge.cpp b/alib2data/src/graph/directed/DirectedEdge.cpp
index 027830cb97..e80f06391c 100644
--- a/alib2data/src/graph/directed/DirectedEdge.cpp
+++ b/alib2data/src/graph/directed/DirectedEdge.cpp
@@ -152,7 +152,7 @@ std::ostream &operator<<(std::ostream &out, const DirectedEdge &node)
 
 void DirectedEdge::dump(std::ostream &os) const
 {
-	os << "(DirectedEdge " << from << " -> " << to << ")";
+	os << "(DirectedEdge " << from << " -> ( " << name << " ) " << to << ")";
 }
 
 } // namespace graph
diff --git a/alib2data/src/graph/undirected/UndirectedEdge.cpp b/alib2data/src/graph/undirected/UndirectedEdge.cpp
index 3ea3976111..a0dc659196 100644
--- a/alib2data/src/graph/undirected/UndirectedEdge.cpp
+++ b/alib2data/src/graph/undirected/UndirectedEdge.cpp
@@ -156,7 +156,7 @@ std::ostream &operator<<(std::ostream &out, const UndirectedEdge &node)
 void UndirectedEdge::dump(std::ostream &os) const
 {
 	auto nodes = sortedNodes();
-	os << "(UndirectedEdge " << nodes.first << " -> " << nodes.second << ")";
+	os << "(UndirectedEdge " << nodes.first << " -> ( " << name << " ) " << nodes.second << ")";
 }
 
 std::pair<Node, Node> UndirectedEdge::sortedNodes() const
-- 
GitLab