Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Added spec for getInorderData method of DirectedGraph.java

  • Loading branch information...
commit 9a3eb797ce136349f3866fc2ae9b35be360fb3df 1 parent 9deef64
@prathamesh-sonpatki authored
Showing with 10 additions and 0 deletions.
  1. +10 −0 spec/ir/directed_graph/directed_graph_spec.rb
View
10 spec/ir/directed_graph/directed_graph_spec.rb
@@ -84,4 +84,14 @@
end
end
+ it "should give data in the graph in the order in which it was inserted" do
+ @graph.getInorderData.to_a.size.should be 0
+ @graph.vertexFor(1)
+ @graph.getInorderData.to_a.should eq [1]
+ @graph.addEdge('foo','bar','baz')
+ @graph.getInorderData.to_a.should eq [1,'foo','bar']
+ @graph.removeVertexFor('foo')
+ @graph.getInorderData.to_a.should eq [1,'bar']
+ end
+
end
Please sign in to comment.
Something went wrong with that request. Please try again.