Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 10 for addTestCases (0.17 sec)

  1. src/cmd/fix/netipv6zone_test.go

    // Copyright 2012 The Go Authors. All rights reserved.
    // Use of this source code is governed by a BSD-style
    // license that can be found in the LICENSE file.
    
    package main
    
    func init() {
    	addTestCases(netipv6zoneTests, netipv6zone)
    }
    
    var netipv6zoneTests = []testCase{
    	{
    		Name: "netipv6zone.0",
    		In: `package main
    
    import "net"
    
    func f() net.Addr {
    	a := &net.IPAddr{ip1}
    	sub(&net.UDPAddr{ip2, 12345})
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Mar 01 23:34:33 UTC 2016
    - 837 bytes
    - Viewed (0)
  2. src/cmd/fix/buildtag_test.go

    // Copyright 2020 The Go Authors. All rights reserved.
    // Use of this source code is governed by a BSD-style
    // license that can be found in the LICENSE file.
    
    package main
    
    func init() {
    	addTestCases(buildtagTests, buildtag)
    }
    
    var buildtagTests = []testCase{
    	{
    		Name:    "buildtag.oldGo",
    		Version: "go1.10",
    		In: `//go:build yes
    // +build yes
    
    package main
    `,
    	},
    	{
    		Name:    "buildtag.new",
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Feb 22 05:31:47 UTC 2024
    - 522 bytes
    - Viewed (0)
  3. src/cmd/fix/egltype_test.go

    // Use of this source code is governed by a BSD-style
    // license that can be found in the LICENSE file.
    
    package main
    
    import "strings"
    
    func init() {
    	addTestCases(eglTestsFor("EGLDisplay"), eglfixDisp)
    	addTestCases(eglTestsFor("EGLConfig"), eglfixConfig)
    }
    
    func eglTestsFor(tname string) []testCase {
    	var eglTests = []testCase{
    		{
    			Name: "egl.localVariable",
    			In: `package main
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Nov 16 22:02:42 UTC 2022
    - 2.8K bytes
    - Viewed (0)
  4. src/cmd/fix/context_test.go

    // Copyright 2016 The Go Authors. All rights reserved.
    // Use of this source code is governed by a BSD-style
    // license that can be found in the LICENSE file.
    
    package main
    
    func init() {
    	addTestCases(contextTests, ctxfix)
    }
    
    var contextTests = []testCase{
    	{
    		Name: "context.0",
    		In: `package main
    
    import "golang.org/x/net/context"
    
    var _ = "golang.org/x/net/context"
    `,
    		Out: `package main
    
    import "context"
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Sep 15 19:24:04 UTC 2016
    - 648 bytes
    - Viewed (0)
  5. src/cmd/fix/printerconfig_test.go

    // Copyright 2012 The Go Authors. All rights reserved.
    // Use of this source code is governed by a BSD-style
    // license that can be found in the LICENSE file.
    
    package main
    
    func init() {
    	addTestCases(printerconfigTests, printerconfig)
    }
    
    var printerconfigTests = []testCase{
    	{
    		Name: "printerconfig.0",
    		In: `package main
    
    import "go/printer"
    
    func f() printer.Config {
    	b := printer.Config{0, 8}
    	c := &printer.Config{0}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Mar 01 23:34:33 UTC 2016
    - 748 bytes
    - Viewed (0)
  6. src/cmd/fix/gotypes_test.go

    // Copyright 2012 The Go Authors. All rights reserved.
    // Use of this source code is governed by a BSD-style
    // license that can be found in the LICENSE file.
    
    package main
    
    func init() {
    	addTestCases(gotypesTests, gotypes)
    }
    
    var gotypesTests = []testCase{
    	{
    		Name: "gotypes.0",
    		In: `package main
    
    import "golang.org/x/tools/go/types"
    import "golang.org/x/tools/go/exact"
    
    var _ = exact.Kind
    
    func f() {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Mar 01 23:34:33 UTC 2016
    - 1.3K bytes
    - Viewed (0)
  7. src/cmd/fix/main_test.go

    	"strings"
    	"testing"
    )
    
    type testCase struct {
    	Name    string
    	Fn      func(*ast.File) bool
    	Version string
    	In      string
    	Out     string
    }
    
    var testCases []testCase
    
    func addTestCases(t []testCase, fn func(*ast.File) bool) {
    	// Fill in fn to avoid repetition in definitions.
    	if fn != nil {
    		for i := range t {
    			if t[i].Fn == nil {
    				t[i].Fn = fn
    			}
    		}
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Feb 22 05:31:47 UTC 2024
    - 3.8K bytes
    - Viewed (0)
  8. src/cmd/fix/cftype_test.go

    // Copyright 2017 The Go Authors. All rights reserved.
    // Use of this source code is governed by a BSD-style
    // license that can be found in the LICENSE file.
    
    package main
    
    func init() {
    	addTestCases(cftypeTests, cftypefix)
    }
    
    var cftypeTests = []testCase{
    	{
    		Name: "cftype.localVariable",
    		In: `package main
    
    // typedef const void *CFTypeRef;
    import "C"
    
    func f() {
    	var x C.CFTypeRef = nil
    	x = nil
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Nov 16 22:02:42 UTC 2022
    - 3.2K bytes
    - Viewed (0)
  9. src/cmd/fix/jnitype_test.go

    // Copyright 2017 The Go Authors. All rights reserved.
    // Use of this source code is governed by a BSD-style
    // license that can be found in the LICENSE file.
    
    package main
    
    func init() {
    	addTestCases(jniTests, jnifix)
    }
    
    var jniTests = []testCase{
    	{
    		Name: "jni.localVariable",
    		In: `package main
    
    // typedef struct _jobject* jobject;
    import "C"
    
    func f() {
    	var x C.jobject = nil
    	x = nil
    	x, x = nil, nil
    }
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Nov 16 22:02:42 UTC 2022
    - 2.6K bytes
    - Viewed (0)
  10. src/cmd/fix/import_test.go

    // Copyright 2011 The Go Authors. All rights reserved.
    // Use of this source code is governed by a BSD-style
    // license that can be found in the LICENSE file.
    
    package main
    
    import "go/ast"
    
    func init() {
    	addTestCases(importTests, nil)
    }
    
    var importTests = []testCase{
    	{
    		Name: "import.0",
    		Fn:   addImportFn("os"),
    		In: `package main
    
    import (
    	"os"
    )
    `,
    		Out: `package main
    
    import (
    	"os"
    )
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Mar 01 23:34:33 UTC 2016
    - 5K bytes
    - Viewed (0)
Back to top