aboutsummaryrefslogtreecommitdiffstats
path: root/ethutil/natspec/natspec_test.go
diff options
context:
space:
mode:
authorzelig <viktor.tron@gmail.com>2015-03-12 20:08:30 +0800
committerzelig <viktor.tron@gmail.com>2015-03-12 20:08:30 +0800
commit4342fe0f221505d4e511a387a6da4a233fa30bca (patch)
treefb15bfc6593cd56539a87eb1b98c3aaf507798ea /ethutil/natspec/natspec_test.go
parent31a95151c9fb95c8527e419347556f455aebd1cb (diff)
downloadgo-tangerine-4342fe0f221505d4e511a387a6da4a233fa30bca.tar
go-tangerine-4342fe0f221505d4e511a387a6da4a233fa30bca.tar.gz
go-tangerine-4342fe0f221505d4e511a387a6da4a233fa30bca.tar.bz2
go-tangerine-4342fe0f221505d4e511a387a6da4a233fa30bca.tar.lz
go-tangerine-4342fe0f221505d4e511a387a6da4a233fa30bca.tar.xz
go-tangerine-4342fe0f221505d4e511a387a6da4a233fa30bca.tar.zst
go-tangerine-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.go22
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)