MCPcopy Index your code
hub / github.com/dagger/dagger / TestIsDevVersion

Function TestIsDevVersion

engine/version_test.go:141–158  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

139}
140
141func TestIsDevVersion(t *testing.T) {
142 tc := []struct {
143 version string
144 isDev bool
145 }{
146 {version: "", isDev: true},
147 {version: "v0.19.9", isDev: false},
148 {version: "v0.19.9-241210-dev-abc123", isDev: true},
149 {version: "v0.19.9-241210123456-dev-abc123def456", isDev: true},
150 {version: "v0.19.9-123", isDev: false},
151 {version: "v0.19.9-rc1", isDev: false},
152 }
153 for _, tc := range tc {
154 t.Run(tc.version, func(t *testing.T) {
155 require.Equal(t, tc.isDev, IsDevVersion(tc.version))
156 })
157 }
158}
159
160func setVersion(t *testing.T, version string) {
161 t.Helper()

Callers

nothing calls this directly

Calls 3

IsDevVersionFunction · 0.85
RunMethod · 0.65
EqualMethod · 0.65

Tested by

no test coverage detected