summaryrefslogtreecommitdiff
path: root/src/cmd/fix/go1rename_test.go
diff options
context:
space:
mode:
authorOndřej Surý <ondrej@sury.org>2012-02-29 11:23:13 +0100
committerOndřej Surý <ondrej@sury.org>2012-02-29 11:23:13 +0100
commitb6d7097a0d6072199f2cd74d67404890697cf78a (patch)
treea2193c528a79fd5606507568859ee5067c6b86e4 /src/cmd/fix/go1rename_test.go
parent4cecda6c347bd6902b960c6a35a967add7070b0d (diff)
downloadgolang-b6d7097a0d6072199f2cd74d67404890697cf78a.tar.gz
Imported Upstream version 2012.02.22upstream-weekly/2012.02.22
Diffstat (limited to 'src/cmd/fix/go1rename_test.go')
-rw-r--r--src/cmd/fix/go1rename_test.go61
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
+)
+`,
+ },
+}