From 4342fe0f221505d4e511a387a6da4a233fa30bca Mon Sep 17 00:00:00 2001 From: zelig Date: Thu, 12 Mar 2015 19:08:30 +0700 Subject: include new minified natspec with RE fix; fix test for the improved error messages --- ethutil/natspec/natspec_test.go | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'ethutil/natspec/natspec_test.go') 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) -- cgit v1.2.3