Skip to content
Snippets Groups Projects
Commit 207977a6 authored by Christopher Schankula's avatar Christopher Schankula :earth_africa:
Browse files

Merge branch 'master' of git@gitlab.cas.mcmaster.ca:schankuc/2XB3.git

parents 0faae404 433101e4
No related branches found
No related tags found
No related merge requests found
......@@ -50,7 +50,7 @@ public class Graph {
/**
* Method to access value in adjacency list
* @param V Vertex to be accessed
* @return Value of vertex V
* @return Adjacency list at V
*/
public Iterable<Integer> adj(int V){
return adj[V];
......
......@@ -12,7 +12,7 @@ public class TestGraph {
}
@Test
public void testV(){
public void testV(){ //Tests if graph is constructed correctly
Graph g = new Graph(8);
assertEquals(g.V(), 8);
assertNotEquals(g.V(), 7);
......@@ -20,7 +20,7 @@ public class TestGraph {
}
@Test
public void testAddEdgeAndE(){
public void testAddEdgeAndE(){//tests to see if edges are added to nodes, therefore increasing edge count
Graph g = new Graph(8);
g.addEdge(4, 3);
g.addEdge(2, 3);
......@@ -32,13 +32,4 @@ public class TestGraph {
assertNotEquals(g.E(), 4);
assertEquals(g.E(), 5);
}
@Test
public void adj(){
Graph g = new Graph(8);
g.addEdge(4, 3);
g.addEdge(2, 3);
g.addEdge(1, 2);
g.addEdge(0, 2);
}
}
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