blob: 88c0e093fc15374e53620c7a76cabe0522affe26 [file] [log] [blame]
// 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
func init() {
addTestCases(netudpgroupTests, netudpgroup)
}
var netudpgroupTests = []testCase{
{
Name: "netudpgroup.0",
In: `package main
import "net"
func f() {
err := x.JoinGroup(gaddr)
err = y.LeaveGroup(gaddr)
}
`,
Out: `package main
import "net"
func f() {
err := x.JoinGroup(nil, gaddr)
err = y.LeaveGroup(nil, gaddr)
}
`,
},
// Innocent function with no body.
{
Name: "netudpgroup.1",
In: `package main
import "net"
func f()
var _ net.IP
`,
Out: `package main
import "net"
func f()
var _ net.IP
`,
},
}