From f8ff6893a579184d1ba62b0e178fe7ddfd695a1b Mon Sep 17 00:00:00 2001 From: Robert Griesemer Date: Thu, 21 Mar 2013 16:56:59 -0700 Subject: [PATCH] test: more systematic shift tests To be submitted once gc agrees. R=rsc, iant, remyoudompheng CC=golang-dev https://golang.org/cl/7861045 --- test/shift1.go | 191 +++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 187 insertions(+), 4 deletions(-) diff --git a/test/shift1.go b/test/shift1.go index 46867a9334..71f7861c61 100644 --- a/test/shift1.go +++ b/test/shift1.go @@ -49,9 +49,192 @@ var ( f3 = imag(1 << s) // ERROR "invalid" ) +// from the spec +func _() { + var ( + s uint = 33 + i = 1 << s // 1 has type int + j int32 = 1 << s // 1 has type int32; j == 0 + k = uint64(1 << s) // 1 has type uint64; k == 1<<33 + m int = 1.0 << s // 1.0 has type int + n = 1.0<