MCPcopy Create free account
hub / github.com/Debian/dcs / TestParseMultipleColons

Function TestParseMultipleColons

dpkgversion/dpkgversion_test.go:166–185  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

164}
165
166func TestParseMultipleColons(t *testing.T) {
167 var a Version
168 var err error
169 b := v(0, "0:0", "0")
170
171 if a, err = Parse("0:0:0-0"); err != nil {
172 t.Errorf("Parsing %q failed: %v", "0:0:0-0", err)
173 }
174 if Compare(a, b) != 0 {
175 t.Errorf("Compare(%v, %v), got %d, want 0", a, b, Compare(a, b))
176 }
177
178 b = v(0, "0:0:0", "0")
179 if a, err = Parse("0:0:0:0-0"); err != nil {
180 t.Errorf("Parsing %q failed: %v", "0:0:0:0-0", err)
181 }
182 if Compare(a, b) != 0 {
183 t.Errorf("Compare(%v, %v), got %d, want 0", a, b, Compare(a, b))
184 }
185}
186
187func TestParseMultipleHyphensAndColons(t *testing.T) {
188 var a Version

Callers

nothing calls this directly

Calls 3

ParseFunction · 0.85
CompareFunction · 0.85
vFunction · 0.70

Tested by

no test coverage detected