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

Function TestNormalizeVersion

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

Source from the content-addressed store, hash-verified

100}
101
102func TestNormalizeVersion(t *testing.T) {
103 setVersion(t, "v0.3.0")
104 tc := []struct {
105 version string
106 result string
107 }{
108 {version: "v0.2.0", result: "v0.2.0"},
109 {version: "0.2.0", result: "v0.2.0"},
110 {version: "v0.2.0-123", result: "v0.2.0-123"},
111 {version: "", result: "v0.3.0"},
112 {version: "foobar", result: presemverModuleVersion},
113 }
114 for _, tc := range tc {
115 t.Run(tc.version, func(t *testing.T) {
116 require.Equal(t, tc.result, NormalizeVersion(tc.version))
117 })
118 }
119}
120
121func TestBaseVersion(t *testing.T) {
122 tc := []struct {

Callers

nothing calls this directly

Calls 4

setVersionFunction · 0.85
NormalizeVersionFunction · 0.85
RunMethod · 0.65
EqualMethod · 0.65

Tested by

no test coverage detected