Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
powerman committed Dec 12, 2017
1 parent 89c9f32 commit ea81e3d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions jsonrpc2/context_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import (
"net/http"
"net/rpc"
"reflect"
"sort"
"testing"

"github.com/powerman/rpc-codec/jsonrpc2"
Expand Down Expand Up @@ -222,6 +223,7 @@ func TestContextBatch(t *testing.T) {
if err != nil {
t.Fatal(err)
}
sort.Slice(res, func(i, j int) bool { return res[i]["id"].(float64) < res[j]["id"].(float64) })
if !reflect.DeepEqual(want, res) {
t.Errorf("%s:\n\n\texp: %#v\n\n\tgot: %#v\n\n", req, want, res)
}
Expand Down

0 comments on commit ea81e3d

Please sign in to comment.