mirror of
https://github.com/fumiama/terasu-cloudflared.git
synced 2026-06-27 07:30:27 +08:00
TUN-528: Move cloudflared into a separate repo
This commit is contained in:
27
vendor/github.com/golang-collections/collections/splay/splay_test.go
generated
vendored
Normal file
27
vendor/github.com/golang-collections/collections/splay/splay_test.go
generated
vendored
Normal file
@@ -0,0 +1,27 @@
|
||||
package splay
|
||||
|
||||
import (
|
||||
//"fmt"
|
||||
"testing"
|
||||
)
|
||||
|
||||
func Test(t *testing.T) {
|
||||
tree := New(func(a,b interface{})bool {
|
||||
return a.(string) < b.(string)
|
||||
})
|
||||
|
||||
tree.Insert("d", 4)
|
||||
tree.Insert("b", 2)
|
||||
tree.Insert("a", 1)
|
||||
tree.Insert("c", 3)
|
||||
|
||||
if tree.Len() != 4 {
|
||||
t.Errorf("expecting len 4")
|
||||
}
|
||||
|
||||
tree.Remove("b")
|
||||
|
||||
if tree.Len() != 3 {
|
||||
t.Errorf("expecting len 3")
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user