diff --git a/oracle/callgraph.go b/oracle/callgraph.go index 53e559b85fe..91b05d2766c 100644 --- a/oracle/callgraph.go +++ b/oracle/callgraph.go @@ -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 } diff --git a/oracle/oracle_test.go b/oracle/oracle_test.go index 2ab26973f99..85a3ae4b29f 100644 --- a/oracle/oracle_test.go +++ b/oracle/oracle_test.go @@ -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",