(t *testing.T)
| 145 | } |
| 146 | |
| 147 | func TestNormalizeVersion(t *testing.T) { |
| 148 | tests := []struct { |
| 149 | input, expected string |
| 150 | }{ |
| 151 | {"v0.5.0", "0.5.0"}, |
| 152 | {"0.5.0", "0.5.0"}, |
| 153 | {"v1.0.0-beta", "1.0.0-beta"}, |
| 154 | {"dev", "dev"}, |
| 155 | } |
| 156 | |
| 157 | for _, tc := range tests { |
| 158 | result := normalizeVersion(tc.input) |
| 159 | if result != tc.expected { |
| 160 | t.Errorf("normalizeVersion(%q) = %q, want %q", tc.input, result, tc.expected) |
| 161 | } |
| 162 | } |
| 163 | } |
| 164 | |
| 165 | func TestBaseVersion(t *testing.T) { |
| 166 | tests := []struct { |
nothing calls this directly
no test coverage detected