diff options
author | ian <ian@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-01-13 05:11:45 +0000 |
---|---|---|
committer | ian <ian@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-01-13 05:11:45 +0000 |
commit | 86240434eb153c149dbc3d77f4fedf9cffcbfc53 (patch) | |
tree | eb5eccc07097c5fcf940967f33ab84a7d47c96fe /libgo/go/testing/example.go | |
parent | 9599f526f8b241e01ca4d54b5bff9c2e6f6dd75a (diff) | |
download | ppe42-gcc-86240434eb153c149dbc3d77f4fedf9cffcbfc53.tar.gz ppe42-gcc-86240434eb153c149dbc3d77f4fedf9cffcbfc53.zip |
libgo: Update to weekly.2011-12-22.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@183150 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libgo/go/testing/example.go')
-rw-r--r-- | libgo/go/testing/example.go | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/libgo/go/testing/example.go b/libgo/go/testing/example.go index e23f13b6f16..fdeda137e76 100644 --- a/libgo/go/testing/example.go +++ b/libgo/go/testing/example.go @@ -9,6 +9,7 @@ import ( "fmt" "io" "os" + "strings" "time" ) @@ -67,11 +68,9 @@ func RunExamples(examples []InternalExample) (ok bool) { // report any errors tstr := fmt.Sprintf("(%.2f seconds)", dt.Seconds()) - if out != eg.Output { - fmt.Printf( - "--- FAIL: %s %s\ngot:\n%s\nwant:\n%s\n", - eg.Name, tstr, out, eg.Output, - ) + if g, e := strings.TrimSpace(out), strings.TrimSpace(eg.Output); g != e { + fmt.Printf("--- FAIL: %s %s\ngot:\n%s\nwant:\n%s\n", + eg.Name, tstr, g, e) ok = false } else if *chatty { fmt.Printf("--- PASS: %s %s\n", eg.Name, tstr) |