statement_test.go 606 B

123456789101112131415161718192021
  1. // Go MySQL Driver - A MySQL-Driver for Go's database/sql package
  2. //
  3. // Copyright 2017 The Go-MySQL-Driver Authors. All rights reserved.
  4. //
  5. // This Source Code Form is subject to the terms of the Mozilla Public
  6. // License, v. 2.0. If a copy of the MPL was not distributed with this file,
  7. // You can obtain one at http://mozilla.org/MPL/2.0/.
  8. package mysql
  9. import "testing"
  10. type customString string
  11. func TestConvertValueCustomTypes(t *testing.T) {
  12. var cstr customString = "string"
  13. c := converter{}
  14. if _, err := c.ConvertValue(cstr); err != nil {
  15. t.Errorf("custom string type should be valid")
  16. }
  17. }