diff options
author | Russ Cox <rsc@golang.org> | 2011-01-19 23:09:00 -0500 |
---|---|---|
committer | Russ Cox <rsc@golang.org> | 2011-01-19 23:09:00 -0500 |
commit | f2b5a07453277de6bc500dc283799441cc375239 (patch) | |
tree | 2c5fdc55fd72274b49b5eff68736ff3075389b3d /test/typeswitch.go | |
parent | 0849944694543a3446da4b1fa0c3d314781ced14 (diff) | |
download | go-f2b5a07453277de6bc500dc283799441cc375239.tar.gz go-f2b5a07453277de6bc500dc283799441cc375239.zip |
delete float, complex - code changes
also:
cmplx -> complex
float64(1.0) -> 1.0
float64(1) -> 1.0
R=gri, r, gri1, r2
CC=golang-dev
https://golang.org/cl/3991043
Diffstat (limited to 'test/typeswitch.go')
-rw-r--r-- | test/typeswitch.go | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/test/typeswitch.go b/test/typeswitch.go index 9e6d10ea87..83fb0985a9 100644 --- a/test/typeswitch.go +++ b/test/typeswitch.go @@ -21,12 +21,15 @@ const ( Last ) -type S struct { a int } +type S struct { + a int +} + var s S = S{1234} var c = make(chan int) -var a = []int{0,1,2,3} +var a = []int{0, 1, 2, 3} var m = make(map[string]int) @@ -68,10 +71,10 @@ func main() { assert(x == true && i == Bool, "bool") case int: assert(x == 7 && i == Int, "int") - case float: - assert(x == 7.4 && i == Float, "float") + case float64: + assert(x == 7.4 && i == Float, "float64") case string: - assert(x == "hello"&& i == String, "string") + assert(x == "hello" && i == String, "string") case S: assert(x.a == 1234 && i == Struct, "struct") case chan int: |