-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfeature_test.go
43 lines (37 loc) · 1.52 KB
/
feature_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
// Code generated by generate.sh; DO NOT EDIT.
package iproto_test
import (
"testing"
"github.com/tarantool/go-iproto"
)
func TestFeature(t *testing.T) {
cases := []struct {
Feature iproto.Feature
Str string
Val int
}{
{iproto.IPROTO_FEATURE_STREAMS, "IPROTO_FEATURE_STREAMS", 0},
{iproto.IPROTO_FEATURE_TRANSACTIONS, "IPROTO_FEATURE_TRANSACTIONS", 1},
{iproto.IPROTO_FEATURE_ERROR_EXTENSION, "IPROTO_FEATURE_ERROR_EXTENSION", 2},
{iproto.IPROTO_FEATURE_WATCHERS, "IPROTO_FEATURE_WATCHERS", 3},
{iproto.IPROTO_FEATURE_PAGINATION, "IPROTO_FEATURE_PAGINATION", 4},
{iproto.IPROTO_FEATURE_SPACE_AND_INDEX_NAMES, "IPROTO_FEATURE_SPACE_AND_INDEX_NAMES", 5},
{iproto.IPROTO_FEATURE_WATCH_ONCE, "IPROTO_FEATURE_WATCH_ONCE", 6},
{iproto.IPROTO_FEATURE_DML_TUPLE_EXTENSION, "IPROTO_FEATURE_DML_TUPLE_EXTENSION", 7},
{iproto.IPROTO_FEATURE_CALL_RET_TUPLE_EXTENSION, "IPROTO_FEATURE_CALL_RET_TUPLE_EXTENSION", 8},
{iproto.IPROTO_FEATURE_CALL_ARG_TUPLE_EXTENSION, "IPROTO_FEATURE_CALL_ARG_TUPLE_EXTENSION", 9},
{iproto.IPROTO_FEATURE_FETCH_SNAPSHOT_CURSOR, "IPROTO_FEATURE_FETCH_SNAPSHOT_CURSOR", 10},
{iproto.IPROTO_FEATURE_IS_SYNC, "IPROTO_FEATURE_IS_SYNC", 11},
{iproto.IPROTO_FEATURE_INSERT_ARROW, "IPROTO_FEATURE_INSERT_ARROW", 12},
}
for _, tc := range cases {
t.Run(tc.Str, func(t *testing.T) {
if tc.Feature.String() != tc.Str {
t.Errorf("Got %s, expected %s", tc.Feature.String(), tc.Str)
}
if int(tc.Feature) != tc.Val {
t.Errorf("Got %d, expected %d", tc.Feature, tc.Val)
}
})
}
}