diff options
Diffstat (limited to 'src/cmd/fix/go1rename_test.go')
-rw-r--r-- | src/cmd/fix/go1rename_test.go | 61 |
1 files changed, 61 insertions, 0 deletions
diff --git a/src/cmd/fix/go1rename_test.go b/src/cmd/fix/go1rename_test.go new file mode 100644 index 000000000..02eaea6a5 --- /dev/null +++ b/src/cmd/fix/go1rename_test.go @@ -0,0 +1,61 @@ +// 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(go1renameTests, go1renameFix.f) +} + +var go1renameTests = []testCase{ + { + Name: "go1rename.0", + In: `package main + +import ( + "crypto/aes" + "crypto/des" + "net/url" + "os" + "runtime" +) + +var ( + _ *aes.Cipher + _ *des.Cipher + _ *des.TripleDESCipher + _ = aes.New() + _ = url.Parse + _ = url.ParseWithReference + _ = url.ParseRequest + _ = os.Exec + _ = runtime.Cgocalls + _ = runtime.Goroutines +) +`, + Out: `package main + +import ( + "crypto/aes" + "crypto/cipher" + "net/url" + "runtime" + "syscall" +) + +var ( + _ cipher.Block + _ cipher.Block + _ cipher.Block + _ = aes.New() + _ = url.Parse + _ = url.Parse + _ = url.ParseRequestURI + _ = syscall.Exec + _ = runtime.NumCgoCall + _ = runtime.NumGoroutine +) +`, + }, +} |