Skip to content
Snippets Groups Projects
Commit 349ee7d7 authored by Lawrence Chung's avatar Lawrence Chung
Browse files

Tested for number of clusters

parent 1e1d7eb0
No related branches found
No related tags found
No related merge requests found
......@@ -45,4 +45,20 @@ public class CCTest {
assertNotEquals(cc.connected(0, 10), true);
assertEquals(cc.connected(2, 7), true);
}
@Test
public void testCount(){
int v = 11;
Graph g = new Graph(v);
g.addEdge(1,3);
g.addEdge(9,8);
g.addEdge(3, 8);
g.addEdge(3, 9);
g.addEdge(7, 4);
g.addEdge(2, 4);
g.addEdge(4, 6);
g.addEdge(0, 5);
CC cc = new CC(g);
assertEquals(cc.count(), 4);
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment