1 // Code generated by "go test -run=Generate -write=all"; DO NOT EDIT.
3 // Copyright 2023 The Go Authors. All rights reserved.
4 // Use of this source code is governed by a BSD-style
5 // license that can be found in the LICENSE file.
11 var parseGoVersionTests = []struct {
15 {"go1.21", version{1, 21}},
16 {"go1.21.0", version{1, 21}},
17 {"go1.21rc2", version{1, 21}},
20 func TestParseGoVersion(t *testing.T) {
21 for _, tt := range parseGoVersionTests {
22 if out, err := parseGoVersion(tt.in); out != tt.out || err != nil {
23 t.Errorf("parseGoVersion(%q) = %v, %v, want %v, nil", tt.in, out, err, tt.out)