MCPcopy
hub / github.com/go-sql-driver/mysql / TestConvertSignedIntegers

Function TestConvertSignedIntegers

statement_test.go:79–98  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

77}
78
79func TestConvertSignedIntegers(t *testing.T) {
80 values := []any{
81 int8(-42),
82 int16(-42),
83 int32(-42),
84 int64(-42),
85 int(-42),
86 }
87
88 for _, value := range values {
89 output, err := converter{}.ConvertValue(value)
90 if err != nil {
91 t.Fatalf("%T type not convertible %s", value, err)
92 }
93
94 if output != int64(-42) {
95 t.Fatalf("%T type not converted, got %#v %T", value, output, output)
96 }
97 }
98}
99
100type myUint64 struct {
101 value uint64

Callers

nothing calls this directly

Calls 1

ConvertValueMethod · 0.80

Tested by

no test coverage detected