From a35f23f34e1dbbbe23ac45563ae00de8e81d55ce Mon Sep 17 00:00:00 2001 From: Marcel van Lohuizen Date: Wed, 24 Oct 2012 11:28:18 +0200 Subject: [PATCH] exp/locale/collate/tools/colcmp: add locale to output of regression failure. R=r CC=golang-dev https://golang.org/cl/6749058 --- src/pkg/exp/locale/collate/tools/colcmp/colcmp.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/pkg/exp/locale/collate/tools/colcmp/colcmp.go b/src/pkg/exp/locale/collate/tools/colcmp/colcmp.go index 61c90b5508..66d12127bd 100644 --- a/src/pkg/exp/locale/collate/tools/colcmp/colcmp.go +++ b/src/pkg/exp/locale/collate/tools/colcmp/colcmp.go @@ -399,7 +399,7 @@ var cmdRegress = &Command{ } const failedKeyCompare = ` -%d: incorrect comparison result for input: +%s:%d: incorrect comparison result for input: a: %q (%.4X) key: %s b: %q (%.4X) @@ -412,7 +412,7 @@ const failedKeyCompare = ` ` const failedCompare = ` -%d: incorrect comparison result for input: +%s:%d: incorrect comparison result for input: a: %q (%.4X) b: %q (%.4X) Compare(a, b) = %d; want %d. @@ -453,12 +453,12 @@ func runRegress(ctxt *Context, args []string) { count++ a := string(ia.UTF8) b := string(ib.UTF8) - fmt.Printf(failedKeyCompare, i-1, a, []rune(a), keyStr(ia.key), b, []rune(b), keyStr(ib.key), cmp, goldCmp, keyStr(gold.Key(ia)), keyStr(gold.Key(ib))) + fmt.Printf(failedKeyCompare, t.Locale, i-1, a, []rune(a), keyStr(ia.key), b, []rune(b), keyStr(ib.key), cmp, goldCmp, keyStr(gold.Key(ia)), keyStr(gold.Key(ib))) } else if cmp := t.Col.Compare(ia, ib); cmp != goldCmp { count++ a := string(ia.UTF8) b := string(ib.UTF8) - fmt.Printf(failedKeyCompare, i-1, a, []rune(a), b, []rune(b), cmp, goldCmp) + fmt.Printf(failedCompare, t.Locale, i-1, a, []rune(a), b, []rune(b), cmp, goldCmp) } } if count > 0 {