aboutsummaryrefslogtreecommitdiffstats
path: root/rpc/args_test.go
diff options
context:
space:
mode:
authorTaylor Gerring <taylor.gerring@gmail.com>2015-03-27 07:13:03 +0800
committerTaylor Gerring <taylor.gerring@gmail.com>2015-03-27 07:13:03 +0800
commitc38630af2330151f7c1f054cd09b38870d0751c8 (patch)
tree69c8c870280ef7e2794874826903172fc9d325fb /rpc/args_test.go
parente0781c2548aec596e6ce1140c5b871555a75f3cb (diff)
downloaddexon-c38630af2330151f7c1f054cd09b38870d0751c8.tar
dexon-c38630af2330151f7c1f054cd09b38870d0751c8.tar.gz
dexon-c38630af2330151f7c1f054cd09b38870d0751c8.tar.bz2
dexon-c38630af2330151f7c1f054cd09b38870d0751c8.tar.lz
dexon-c38630af2330151f7c1f054cd09b38870d0751c8.tar.xz
dexon-c38630af2330151f7c1f054cd09b38870d0751c8.tar.zst
dexon-c38630af2330151f7c1f054cd09b38870d0751c8.zip
Test blockHeightFromJsonInvalid
Diffstat (limited to 'rpc/args_test.go')
-rw-r--r--rpc/args_test.go9
1 files changed, 9 insertions, 0 deletions
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)
+ }
+}