github.com/go-asm/go@v1.21.1-0.20240213172139-40c5ead50c48/cmd/go/gover/toolchain_test.go (about)

     1  // Copyright 2023 The Go Authors. All rights reserved.
     2  // Use of this source code is governed by a BSD-style
     3  // license that can be found in the LICENSE file.
     4  
     5  package gover
     6  
     7  import "testing"
     8  
     9  func TestFromToolchain(t *testing.T) { test1(t, fromToolchainTests, "FromToolchain", FromToolchain) }
    10  
    11  var fromToolchainTests = []testCase1[string, string]{
    12  	{"go1.2.3", "1.2.3"},
    13  	{"1.2.3", ""},
    14  	{"go1.2.3+bigcorp", ""},
    15  	{"go1.2.3-bigcorp", "1.2.3"},
    16  	{"go1.2.3-bigcorp more text", "1.2.3"},
    17  	{"gccgo-go1.23rc4", ""},
    18  	{"gccgo-go1.23rc4-bigdwarf", ""},
    19  }