Skip to content

Commit 6ea9982

Browse files
committed
Go: Add unit test to sanity check HasGoVersion
1 parent ab255d7 commit 6ea9982

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

go/extractor/toolchain/toolchain_test.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,9 @@ func TestParseGoVersion(t *testing.T) {
1414
}
1515
}
1616
}
17+
18+
func TestHasGoVersion(t *testing.T) {
19+
if HasGoVersion("1.21") {
20+
t.Error("Exepected HasGoVersion(\"1.21\" to be false, but got true)")
21+
}
22+
}

0 commit comments

Comments
 (0)