From c38630af2330151f7c1f054cd09b38870d0751c8 Mon Sep 17 00:00:00 2001 From: Taylor Gerring Date: Fri, 27 Mar 2015 00:13:03 +0100 Subject: Test blockHeightFromJsonInvalid --- rpc/args_test.go | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'rpc') diff --git a/rpc/args_test.go b/rpc/args_test.go index dee72b86f..cb1d1904b 100644 --- a/rpc/args_test.go +++ b/rpc/args_test.go @@ -1680,3 +1680,12 @@ func TestSubmitWorkArgsDigestInt(t *testing.T) { t.Error(str) } } + +func TestBlockHeightFromJsonInvalid(t *testing.T) { + var num int64 + var msg json.RawMessage = []byte(`}{`) + str := ExpectDecodeParamError(blockHeightFromJson(msg, &num)) + if len(str) > 0 { + t.Error(str) + } +} -- cgit