mirror of
https://github.com/arnaucube/kesto.git
synced 2026-02-07 19:46:40 +01:00
Add arbotree interface wrapper
This commit is contained in:
22
treeinterface/arbotree/wrapper_test.go
Normal file
22
treeinterface/arbotree/wrapper_test.go
Normal file
@@ -0,0 +1,22 @@
|
||||
package arbotree
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"go.vocdoni.io/dvote/censustree"
|
||||
)
|
||||
|
||||
func TestInterface(t *testing.T) {
|
||||
storage := t.TempDir()
|
||||
tree := &Tree{}
|
||||
err := tree.Init("test", storage)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
var i interface{} = tree
|
||||
_, ok := i.(censustree.Tree)
|
||||
if !ok {
|
||||
t.Fatal("censustree interface not matched by arbotree wrapper")
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user