-
-
Notifications
You must be signed in to change notification settings - Fork 77
/
output_tbln_test.go
57 lines (55 loc) · 898 Bytes
/
output_tbln_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
54
55
56
57
package trdsql
import "testing"
func Test_convertType(t *testing.T) {
type args struct {
dbType string
}
tests := []struct {
name string
args args
want string
}{
{
name: "testInt",
args: args{"int"},
want: "int",
},
{
name: "testBigInt",
args: args{"bigint"},
want: "bigint",
},
{
name: "testNumeric",
args: args{"float"},
want: "numeric",
},
{
name: "testBool",
args: args{"bool"},
want: "bool",
},
{
name: "testTimeStamp",
args: args{"timestamp"},
want: "timestamp",
},
{
name: "testText",
args: args{"text"},
want: "text",
},
{
name: "testUnknown",
args: args{"unknown"},
want: "text",
},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
if got := convertType(tt.args.dbType); got != tt.want {
t.Errorf("convertType() = %v, want %v", got, tt.want)
}
})
}
}