diff options
author | zelig <viktor.tron@gmail.com> | 2015-03-12 20:08:30 +0800 |
---|---|---|
committer | zelig <viktor.tron@gmail.com> | 2015-03-12 20:08:30 +0800 |
commit | 4342fe0f221505d4e511a387a6da4a233fa30bca (patch) | |
tree | fb15bfc6593cd56539a87eb1b98c3aaf507798ea /ethutil/natspec/natspec_test.go | |
parent | 31a95151c9fb95c8527e419347556f455aebd1cb (diff) | |
download | dexon-4342fe0f221505d4e511a387a6da4a233fa30bca.tar dexon-4342fe0f221505d4e511a387a6da4a233fa30bca.tar.gz dexon-4342fe0f221505d4e511a387a6da4a233fa30bca.tar.bz2 dexon-4342fe0f221505d4e511a387a6da4a233fa30bca.tar.lz dexon-4342fe0f221505d4e511a387a6da4a233fa30bca.tar.xz dexon-4342fe0f221505d4e511a387a6da4a233fa30bca.tar.zst dexon-4342fe0f221505d4e511a387a6da4a233fa30bca.zip |
include new minified natspec with RE fix; fix test for the improved error messages
Diffstat (limited to 'ethutil/natspec/natspec_test.go')
-rw-r--r-- | ethutil/natspec/natspec_test.go | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/ethutil/natspec/natspec_test.go b/ethutil/natspec/natspec_test.go index 498f8d78e..330dc831d 100644 --- a/ethutil/natspec/natspec_test.go +++ b/ethutil/natspec/natspec_test.go @@ -69,22 +69,22 @@ func TestNotice(t *testing.T) { } // https://github.com/ethereum/natspec.js/issues/1 - // badDesc := "Will multiply `e` by 7 and return `a * 7`." - // notice, err = ns.Notice(tx, abi, method, badDesc) + badDesc := "Will multiply `e` by 7 and return `a * 7`." + notice, err = ns.Notice(tx, abi, method, badDesc) - // expected = "natspec.js error evaluating expression: wrong input param in expression ''" + expected = "natspec.js error evaluating expression: Error: Natspec evaluation failed, wrong input params" - // if err == nil { - // t.Errorf("expected error, got nothing (notice: '%v')", notice) - // } else { - // if err.Error() != expected { - // t.Errorf("expected error '%s' got '%v' (notice: '%v')", expected, err, notice) - // } - // } + if err == nil { + t.Errorf("expected error, got nothing (notice: '%v')", notice) + } else { + if err.Error() != expected { + t.Errorf("expected error '%s' got '%v' (notice: '%v')", expected, err, notice) + } + } notice, err = ns.Notice(tx, abi, "missing_method", desc) - expected = "natspec.js error evaluating expression: wrong input params in expression 'Will multiply `a` by 7 and return `a * 7`.'" + expected = "natspec.js error evaluating expression: Error: Natspec evaluation failed, method does not exist" if err == nil { t.Errorf("expected error, got nothing (notice: '%v')", notice) |