(t *testing.T)
| 420 | } |
| 421 | |
| 422 | func TestParts(t *testing.T) { |
| 423 | v, err := NewVersion("1.2.3-beta.1+build.123") |
| 424 | if err != nil { |
| 425 | t.Error("Error parsing version 1.2.3-beta.1+build.123") |
| 426 | } |
| 427 | |
| 428 | if v.Major() != 1 { |
| 429 | t.Error("Major() returning wrong value") |
| 430 | } |
| 431 | if v.Minor() != 2 { |
| 432 | t.Error("Minor() returning wrong value") |
| 433 | } |
| 434 | if v.Patch() != 3 { |
| 435 | t.Error("Patch() returning wrong value") |
| 436 | } |
| 437 | if v.Prerelease() != "beta.1" { |
| 438 | t.Error("Prerelease() returning wrong value") |
| 439 | } |
| 440 | if v.Metadata() != "build.123" { |
| 441 | t.Error("Metadata() returning wrong value") |
| 442 | } |
| 443 | } |
| 444 | |
| 445 | func TestCoerceString(t *testing.T) { |
| 446 | tests := []struct { |
nothing calls this directly
no test coverage detected
searching dependent graphs…