summaryrefslogtreecommitdiff
path: root/test/range.go
diff options
context:
space:
mode:
authorAlan Donovan <adonovan@google.com>2013-02-11 18:20:52 -0500
committerAlan Donovan <adonovan@google.com>2013-02-11 18:20:52 -0500
commit3d25b0827e2e3ec50f26209a1c43894f6fe1ff40 (patch)
treecf7526d0549ee03d48e782a0d21eb565d1b0d2e1 /test/range.go
parent6d4af3d1b5cd81a4c864298e0bf85b9840fdb689 (diff)
downloadgo-3d25b0827e2e3ec50f26209a1c43894f6fe1ff40.tar.gz
test: a number of fixes.
Details: - reorder.go: delete p8. (Once expectation is changed per b/4627 it is identical to p1.) - switch.go: added some more (degenerate) switches. - range.go: improved error messages in a few cases. - method.go: added tests of calls to promoted methods. R=iant CC=golang-dev https://codereview.appspot.com/7306087
Diffstat (limited to 'test/range.go')
-rw-r--r--test/range.go22
1 files changed, 11 insertions, 11 deletions
diff --git a/test/range.go b/test/range.go
index 68b0c9a2f..8effbe9c5 100644
--- a/test/range.go
+++ b/test/range.go
@@ -55,10 +55,10 @@ func testslice() {
panic("fail")
}
if s != 15 {
- println("wrong sum ranging over makeslice")
+ println("wrong sum ranging over makeslice", s)
panic("fail")
}
-
+
x := []int{10, 20}
y := []int{99}
i := 1
@@ -82,7 +82,7 @@ func testslice1() {
panic("fail")
}
if s != 10 {
- println("wrong sum ranging over makeslice")
+ println("wrong sum ranging over makeslice", s)
panic("fail")
}
}
@@ -106,7 +106,7 @@ func testarray() {
panic("fail")
}
if s != 15 {
- println("wrong sum ranging over makearray")
+ println("wrong sum ranging over makearray", s)
panic("fail")
}
}
@@ -122,7 +122,7 @@ func testarray1() {
panic("fail")
}
if s != 10 {
- println("wrong sum ranging over makearray")
+ println("wrong sum ranging over makearray", s)
panic("fail")
}
}
@@ -155,7 +155,7 @@ func testarrayptr() {
panic("fail")
}
if s != 15 {
- println("wrong sum ranging over makearrayptr")
+ println("wrong sum ranging over makearrayptr", s)
panic("fail")
}
}
@@ -171,7 +171,7 @@ func testarrayptr1() {
panic("fail")
}
if s != 10 {
- println("wrong sum ranging over makearrayptr")
+ println("wrong sum ranging over makearrayptr", s)
panic("fail")
}
}
@@ -195,7 +195,7 @@ func teststring() {
panic("fail")
}
if s != 'a'+'b'+'c'+'d'+'☺' {
- println("wrong sum ranging over makestring")
+ println("wrong sum ranging over makestring", s)
panic("fail")
}
}
@@ -211,7 +211,7 @@ func teststring1() {
panic("fail")
}
if s != 10 {
- println("wrong sum ranging over makestring")
+ println("wrong sum ranging over makestring", s)
panic("fail")
}
}
@@ -235,7 +235,7 @@ func testmap() {
panic("fail")
}
if s != 'a'+'b'+'c'+'d'+'☺' {
- println("wrong sum ranging over makemap")
+ println("wrong sum ranging over makemap", s)
panic("fail")
}
}
@@ -251,7 +251,7 @@ func testmap1() {
panic("fail")
}
if s != 10 {
- println("wrong sum ranging over makemap")
+ println("wrong sum ranging over makemap", s)
panic("fail")
}
}