Source file src/cmd/fix/context_test.go

     1  // Copyright 2016 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 main
     6  
     7  func init() {
     8  	addTestCases(contextTests, ctxfix)
     9  }
    10  
    11  var contextTests = []testCase{
    12  	{
    13  		Name: "context.0",
    14  		In: `package main
    15  
    16  import "golang.org/x/net/context"
    17  
    18  var _ = "golang.org/x/net/context"
    19  `,
    20  		Out: `package main
    21  
    22  import "context"
    23  
    24  var _ = "golang.org/x/net/context"
    25  `,
    26  	},
    27  	{
    28  		Name: "context.1",
    29  		In: `package main
    30  
    31  import ctx "golang.org/x/net/context"
    32  
    33  var _ = ctx.Background()
    34  `,
    35  		Out: `package main
    36  
    37  import ctx "context"
    38  
    39  var _ = ctx.Background()
    40  `,
    41  	},
    42  }
    43  

View as plain text