Commit fa6e4a36 authored by Guilhelm Savin's avatar Guilhelm Savin

Minor fix in tests

parent abbde18e
...@@ -71,7 +71,7 @@ public class TestKruskalPrim { ...@@ -71,7 +71,7 @@ public class TestKruskalPrim {
assertEquals(expectedWeight, k.getTreeWeight(), 0); assertEquals(expectedWeight, k.getTreeWeight(), 0);
int edgeCount = 0; int edgeCount = 0;
for (Edge e : k.getTreeEdges()) { for (Edge e : k.getTreeEdges()) {
boolean b = e.getAttribute(k.getFlagAttribute()); Boolean b = e.getAttribute(k.getFlagAttribute());
assertTrue(b); assertTrue(b);
edgeCount++; edgeCount++;
} }
...@@ -80,7 +80,7 @@ public class TestKruskalPrim { ...@@ -80,7 +80,7 @@ public class TestKruskalPrim {
edgeCount = 0; edgeCount = 0;
double treeWeight = 0; double treeWeight = 0;
for (Edge e : g.getEachEdge()) { for (Edge e : g.getEachEdge()) {
boolean b = e.getAttribute(k.getFlagAttribute()); Boolean b = e.getAttribute(k.getFlagAttribute());
if (b) { if (b) {
edgeCount++; edgeCount++;
treeWeight += e.getNumber("weight"); treeWeight += e.getNumber("weight");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment