MCPcopy Create free account
hub / github.com/Masterminds/semver / TestSQLScanner

Function TestSQLScanner

version_test.go:957–974  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

955}
956
957func TestSQLScanner(t *testing.T) {
958 sVer := "1.1.1"
959 x, err := StrictNewVersion(sVer)
960 if err != nil {
961 t.Errorf("Error creating version: %s", err)
962 }
963 var s sql.Scanner = x
964 var out *Version
965 var ok bool
966 if out, ok = s.(*Version); !ok {
967 t.Errorf("Error expected Version type, got=%T want=%T", s, Version{})
968 }
969 got := out.String()
970 want := sVer
971 if got != want {
972 t.Errorf("Error sql scanner unexpected scan content: got=%q want=%q", got, want)
973 }
974}
975
976func TestScanInputTypes(t *testing.T) {
977 v := &Version{}

Callers

nothing calls this directly

Calls 2

StringMethod · 0.95
StrictNewVersionFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…