Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(1084)

Unified Diff: test/bigalg.go

Issue 7310087: code review 7310087: test: ensure all failing tests exit nonzero. (Closed)
Patch Set: diff -r 36b36840f7f1 https://code.google.com/p/go/ Created 12 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « test/alias1.go ('k') | test/cmplxdivide.go » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/bigalg.go
===================================================================
--- a/test/bigalg.go
+++ b/test/bigalg.go
@@ -15,18 +15,21 @@
d byte
}
-var a = []int{ 1, 2, 3 }
+var a = []int{1, 2, 3}
var NIL []int
func arraycmptest() {
if NIL != nil {
println("fail1:", NIL, "!= nil")
+ panic("bigalg")
}
if nil != NIL {
println("fail2: nil !=", NIL)
+ panic("bigalg")
}
if a == nil || nil == a {
println("fail3:", a, "== nil")
+ panic("bigalg")
}
}
@@ -49,12 +52,14 @@
t1 := mt[0]
if t1.a != t.a || t1.b != t.b || t1.c != t.c || t1.d != t.d {
println("fail: map val struct", t1.a, t1.b, t1.c, t1.d)
+ panic("bigalg")
}
ma[1] = a
a1 := ma[1]
if !SameArray(a, a1) {
println("fail: map val array", a, a1)
+ panic("bigalg")
}
}
@@ -72,15 +77,18 @@
t1 := <-ct
if t1.a != t.a || t1.b != t.b || t1.c != t.c || t1.d != t.d {
println("fail: map val struct", t1.a, t1.b, t1.c, t1.d)
+ panic("bigalg")
}
a1 := <-ca
if !SameArray(a, a1) {
println("fail: map val array", a, a1)
+ panic("bigalg")
}
}
-type E struct { }
+type E struct{}
+
var e E
func interfacetest() {
@@ -90,6 +98,7 @@
a1 := i.([]int)
if !SameArray(a, a1) {
println("interface <-> []int", a, a1)
+ panic("bigalg")
}
pa := new([]int)
*pa = a
@@ -97,12 +106,14 @@
a1 = *i.(*[]int)
if !SameArray(a, a1) {
println("interface <-> *[]int", a, a1)
+ panic("bigalg")
}
i = t
t1 := i.(T)
if t1.a != t.a || t1.b != t.b || t1.c != t.c || t1.d != t.d {
println("interface <-> struct", t1.a, t1.b, t1.c, t1.d)
+ panic("bigalg")
}
i = e
« no previous file with comments | « test/alias1.go ('k') | test/cmplxdivide.go » ('j') | no next file with comments »

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b