github.com/pbberlin/tools@v0.0.0-20160910141205-7aa5421c2169/omap/osmaps/linked_list_test.go (about) 1 // +build ll 2 // go test -tags=ll 3 4 package osmaps 5 6 import "testing" 7 8 func TestInsertUpdateFind(t *testing.T) { 9 10 nd := &node{} 11 nd.kv = make([]kvt, 0, 100) 12 fct1 := func(a, b string) bool { 13 return a < b 14 } 15 16 keys := []string{"c", "a", "f", "e", "T", "r", "i", "n", "k", "i", "t"} 17 keys = []string{"c", "a", "f", "e", "b", "T", "Q", "L"} 18 keys = []string{"ca", "ff", "ee", "tr", "in", "k ", "ni", "ch", "t ", "so", "vi", "el"} 19 20 for _, key := range keys { 21 insertLinkedList(nd, fct1, key, "val_of_"+key) 22 } 23 24 }