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

Function TestVersionString

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

Source from the content-addressed store, hash-verified

38}
39
40func TestVersionString(t *testing.T) {
41 t.Parallel()
42
43 tests := []struct {
44 v version
45 want string
46 }{
47 {version{2, 32, 0, ""}, "v2.32.0"},
48 {version{2, 32, 0, "rc.0"}, "v2.32.0-rc.0"},
49 {version{1, 0, 0, "beta.1"}, "v1.0.0-beta.1"},
50 }
51
52 for _, tt := range tests {
53 t.Run(tt.want, func(t *testing.T) {
54 t.Parallel()
55 if got := tt.v.String(); got != tt.want {
56 t.Fatalf("String() = %q, want %q", got, tt.want)
57 }
58 })
59 }
60}
61
62func TestVersionIsRC(t *testing.T) {
63 t.Parallel()

Callers

nothing calls this directly

Calls 3

RunMethod · 0.65
StringMethod · 0.45
FatalfMethod · 0.45

Tested by

no test coverage detected