MCPcopy Index your code
hub / github.com/coder/coder / TestVersionIsRC

Function TestVersionIsRC

scripts/releaser/version_test.go:62–83  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

60}
61
62func TestVersionIsRC(t *testing.T) {
63 t.Parallel()
64
65 tests := []struct {
66 v version
67 want bool
68 }{
69 {version{2, 32, 0, "rc.0"}, true},
70 {version{2, 32, 0, "rc.1"}, true},
71 {version{2, 32, 0, ""}, false},
72 {version{2, 32, 0, "beta.1"}, false},
73 }
74
75 for _, tt := range tests {
76 t.Run(tt.v.String(), func(t *testing.T) {
77 t.Parallel()
78 if got := tt.v.IsRC(); got != tt.want {
79 t.Fatalf("IsRC() = %v, want %v", got, tt.want)
80 }
81 })
82 }
83}
84
85func TestVersionRCNumber(t *testing.T) {
86 t.Parallel()

Callers

nothing calls this directly

Calls 4

IsRCMethod · 0.80
RunMethod · 0.65
StringMethod · 0.45
FatalfMethod · 0.45

Tested by

no test coverage detected