dev: add missing test descriptions (#4107)

This commit is contained in:
Ludovic Fernandez 2023-09-27 08:41:24 +02:00 committed by GitHub
parent 95edd30b41
commit 88a40c6924
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -30,42 +30,42 @@ func Test_evaluateBuildTags(t *testing.T) {
assert assert.BoolAssertionFunc
}{
{
desc: "",
desc: "old build tag syntax, version inside the range",
tag: "// +build go1.18",
assert: assert.True,
},
{
desc: "",
desc: "old build tag syntax, version outside the range",
tag: "// +build go1.42",
assert: assert.False,
},
{
desc: "",
desc: "version inside the range",
tag: "//go:build go1.18",
assert: assert.True,
},
{
desc: "",
desc: "version outside the range",
tag: "//go:build go1.42",
assert: assert.False,
},
{
desc: "",
desc: "supported OS",
tag: "//go:build " + runtime.GOOS,
assert: assert.True,
},
{
desc: "",
desc: "negate unsupported OS",
tag: "//go:build !wondiws",
assert: assert.True,
},
{
desc: "",
desc: "unsupported OS",
tag: "//go:build wondiws",
assert: assert.False,
},
{
desc: "",
desc: "version inside the range and supported OS",
tag: "//go:build go1.18 && " + runtime.GOOS,
assert: assert.True,
},