File: stability_test.go

package info (click to toggle)
golang-github-mcuadros-go-version 1.0.0-3
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 176 kB
  • sloc: makefile: 2
file content (21 lines) | stat: -rw-r--r-- 379 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
package version

import (
	"testing"
)

var stabilityValues = map[string]int{
	"1.0":       Stable,
	"1.0-dev":   Development,
	"1.0-alpha": Alpha,
	"1.0b1":     Beta,
	"1.0rc1":    RC,
}

func TestGetStability(t *testing.T) {
	for in, out := range stabilityValues {
		if x := GetStability(in); x != out {
			t.Errorf("FAIL: GetStability(%v) = %v: want %v", in, x, out)
		}
	}
}