diff options
author | Taylor Gerring <taylor.gerring@gmail.com> | 2015-03-27 05:58:12 +0800 |
---|---|---|
committer | Taylor Gerring <taylor.gerring@gmail.com> | 2015-03-27 05:58:12 +0800 |
commit | 3fcef54f9b81b49f7af2f06a231cd7e44ea851ba (patch) | |
tree | a899c48439b40f7d7f07a9ce7f21d26672379bda /rpc/args_test.go | |
parent | 6bd1f6cc49acd459e61559e5af515da2db2481e5 (diff) | |
download | dexon-3fcef54f9b81b49f7af2f06a231cd7e44ea851ba.tar.gz dexon-3fcef54f9b81b49f7af2f06a231cd7e44ea851ba.tar.zst dexon-3fcef54f9b81b49f7af2f06a231cd7e44ea851ba.zip |
tidy
Diffstat (limited to 'rpc/args_test.go')
-rw-r--r-- | rpc/args_test.go | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/rpc/args_test.go b/rpc/args_test.go index c5d407c97..b658eed68 100644 --- a/rpc/args_test.go +++ b/rpc/args_test.go @@ -155,14 +155,9 @@ func TestGetBalanceArgsInvalid(t *testing.T) { input := `6` args := new(GetBalanceArgs) - err := json.Unmarshal([]byte(input), &args) - switch err.(type) { - case nil: - t.Error("Expected error but didn't get one") - case *DecodeParamError: - break - default: - t.Errorf("Expected *rpc.DecodeParamError but got %T with message %s", err, err.Error()) + str := ExpectDecodeParamError(json.Unmarshal([]byte(input), &args)) + if len(str) > 0 { + t.Error(str) } } |