]> Cypherpunks.ru repositories - gostls13.git/blob - src/go/types/version_test.go
runtime: prevent send on closed channel in wakeableSleep
[gostls13.git] / src / go / types / version_test.go
1 // Code generated by "go test -run=Generate -write=all"; DO NOT EDIT.
2
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.
6
7 package types
8
9 import "testing"
10
11 var parseGoVersionTests = []struct {
12         in  string
13         out version
14 }{
15         {"go1.21", version{1, 21}},
16         {"go1.21.0", version{1, 21}},
17         {"go1.21rc2", version{1, 21}},
18 }
19
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)
24                 }
25         }
26 }