github.com/eris-ltd/erisdb@v0.25.0/storage/unique_iterator_test.go (about)

     1  package storage
     2  
     3  import (
     4  	"testing"
     5  
     6  	"github.com/stretchr/testify/assert"
     7  )
     8  
     9  func TestUniqueIterator(t *testing.T) {
    10  	it := iteratorOver(kvPairs("a", "dogs", "a", "pogs",
    11  		"b", "slime", "b", "grime", "b", "nogs",
    12  		"c", "strudel"))
    13  
    14  	assert.Equal(t, kvPairs("a", "dogs", "b", "slime", "c", "strudel"),
    15  		collectIterator(Uniq(it)))
    16  }