Commit a35f23f3 authored by Marcel van Lohuizen's avatar Marcel van Lohuizen

exp/locale/collate/tools/colcmp: add locale to output of regression failure.

R=r
CC=golang-dev
https://golang.org/cl/6749058
parent 80dbe743
...@@ -399,7 +399,7 @@ var cmdRegress = &Command{ ...@@ -399,7 +399,7 @@ var cmdRegress = &Command{
} }
const failedKeyCompare = ` const failedKeyCompare = `
%d: incorrect comparison result for input: %s:%d: incorrect comparison result for input:
a: %q (%.4X) a: %q (%.4X)
key: %s key: %s
b: %q (%.4X) b: %q (%.4X)
...@@ -412,7 +412,7 @@ const failedKeyCompare = ` ...@@ -412,7 +412,7 @@ const failedKeyCompare = `
` `
const failedCompare = ` const failedCompare = `
%d: incorrect comparison result for input: %s:%d: incorrect comparison result for input:
a: %q (%.4X) a: %q (%.4X)
b: %q (%.4X) b: %q (%.4X)
Compare(a, b) = %d; want %d. Compare(a, b) = %d; want %d.
...@@ -453,12 +453,12 @@ func runRegress(ctxt *Context, args []string) { ...@@ -453,12 +453,12 @@ func runRegress(ctxt *Context, args []string) {
count++ count++
a := string(ia.UTF8) a := string(ia.UTF8)
b := string(ib.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 { } else if cmp := t.Col.Compare(ia, ib); cmp != goldCmp {
count++ count++
a := string(ia.UTF8) a := string(ia.UTF8)
b := string(ib.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 { if count > 0 {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment