-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdb_type_test.go
53 lines (47 loc) · 1.24 KB
/
db_type_test.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
package storager
import (
"testing"
"github.com/weedge/pkg/driver"
)
func TestDBBitmap_Implements(t *testing.T) {
var i interface{} = &DBBitmap{}
if _, ok := i.(driver.IBitmapCmd); !ok {
t.Fatalf("does not implement driver.IBitmapCmd")
}
}
func TestDBString_Implements(t *testing.T) {
var i interface{} = &DBString{}
if _, ok := i.(driver.IStringCmd); !ok {
t.Fatalf("does not implement driver.IStringCmd")
}
}
func TestDBHash_Implements(t *testing.T) {
var i interface{} = &DBHash{}
if _, ok := i.(driver.IHashCmd); !ok {
t.Fatalf("does not implement driver.IHashCmd")
}
}
func TestDBList_Implements(t *testing.T) {
var i interface{} = &DBList{}
if _, ok := i.(driver.IListCmd); !ok {
t.Fatalf("does not implement driver.IListCmd")
}
}
func TestDBSet_Implements(t *testing.T) {
var i interface{} = &DBSet{}
if _, ok := i.(driver.ISetCmd); !ok {
t.Fatalf("does not implement driver.ISetCmd")
}
}
func TestDBZSet_Implements(t *testing.T) {
var i interface{} = &DBZSet{}
if _, ok := i.(driver.IZsetCmd); !ok {
t.Fatalf("does not implement driver.IZsetCmd")
}
}
func TestDBSLot_Implements(t *testing.T) {
var i interface{} = &DBSlot{}
if _, ok := i.(driver.ISlotsCmd); !ok {
t.Fatalf("does not implement driver.ISlotsCmd")
}
}