1
0
mirror of https://github.com/golang/go synced 2024-10-01 03:18:33 -06:00

go.tools/oracle: eliminate reliance on undefined map iteration order.

(Unmasked by recent randomization of small (<8) map iteration.)

R=gri, crawshaw, bradfitz
CC=golang-codereviews
https://golang.org/cl/51170044
This commit is contained in:
Alan Donovan 2014-01-15 22:55:52 -05:00
parent e8afbfad8c
commit d20cbc12f1
2 changed files with 2 additions and 2 deletions

View File

@ -127,6 +127,7 @@ func (r *callgraphResult) toSerial(res *serial.Result, fset *token.FileSet) {
for callee := range call.CalleesOf(n) {
j.Children = append(j.Children, numbering[callee])
}
sort.Ints(j.Children)
}
res.Callgraph = cg
}

View File

@ -211,8 +211,7 @@ func TestOracle(t *testing.T) {
"testdata/src/main/what.go",
// JSON:
// TODO(adonovan): most of these are very similar; combine them.
// TODO(adonovan): enable this test once it works again.
//"testdata/src/main/callgraph-json.go",
"testdata/src/main/callgraph-json.go",
"testdata/src/main/calls-json.go",
"testdata/src/main/peers-json.go",
"testdata/src/main/describe-json.go",