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

Function TestConvertDerivedString

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

Source from the content-addressed store, hash-verified

16)
17
18func TestConvertDerivedString(t *testing.T) {
19 type derived string
20
21 output, err := converter{}.ConvertValue(derived("value"))
22 if err != nil {
23 t.Fatal("Derived string type not convertible", err)
24 }
25
26 if output != "value" {
27 t.Fatalf("Derived string type not converted, got %#v %T", output, output)
28 }
29}
30
31func TestConvertDerivedByteSlice(t *testing.T) {
32 type derived []uint8

Callers

nothing calls this directly

Calls 2

derivedTypeAlias · 0.85
ConvertValueMethod · 0.80

Tested by

no test coverage detected