MCPcopy
hub / github.com/segmentio/ksuid / TestEncodeAndDecode

Function TestEncodeAndDecode

ksuid_test.go:113–123  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

111}
112
113func TestEncodeAndDecode(t *testing.T) {
114 x := New()
115 builtFromEncodedString, err := Parse(x.String())
116 if err != nil {
117 t.Fatal("Unexpected error", err)
118 }
119
120 if Compare(x, builtFromEncodedString) != 0 {
121 t.Fatal("Parse(X).String() != X")
122 }
123}
124
125func TestMarshalText(t *testing.T) {
126 var id1 = New()

Callers

nothing calls this directly

Calls 4

NewFunction · 0.85
ParseFunction · 0.85
CompareFunction · 0.85
StringMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…