Enumerate iterator types

This commit is contained in:
kortschak 2014-07-03 09:57:31 +09:30
parent 1f67913ed9
commit cd46452b63
23 changed files with 145 additions and 68 deletions

View file

@ -160,7 +160,7 @@ func TestIterator(t *testing.T) {
size, accurate := it.Size()
So(size, ShouldBeBetween, 0, 20)
So(accurate, ShouldBeFalse)
So(it.Type(), ShouldEqual, "all")
So(it.Type(), ShouldEqual, graph.All)
re_it, ok := it.Optimize()
So(ok, ShouldBeFalse)
So(re_it, ShouldPointTo, it)
@ -209,7 +209,7 @@ func TestIterator(t *testing.T) {
size, accurate := it.Size()
So(size, ShouldBeBetween, 0, 20)
So(accurate, ShouldBeFalse)
So(it.Type(), ShouldEqual, "all")
So(it.Type(), ShouldEqual, graph.All)
re_it, ok := it.Optimize()
So(ok, ShouldBeFalse)
So(re_it, ShouldPointTo, it)
@ -407,7 +407,7 @@ func TestOptimize(t *testing.T) {
oldIt := lto.Clone()
newIt, ok := lto.Optimize()
So(ok, ShouldBeTrue)
So(newIt.Type(), ShouldEqual, "leveldb")
So(newIt.Type(), ShouldEqual, Type())
Convey("Containing the right things", func() {
afterOp := extractTripleFromIterator(ts, newIt)