aboutsummaryrefslogtreecommitdiffstats
path: root/common/natspec/natspec_test.go
diff options
context:
space:
mode:
authorzelig <viktor.tron@gmail.com>2015-03-31 23:02:55 +0800
committerzelig <viktor.tron@gmail.com>2015-04-20 03:57:48 +0800
commit3a540425a3d7fc29233b5cd3e7b79b4866f35d57 (patch)
treed1e101d7dcf79d362d087d431f5c4cefafbd30fd /common/natspec/natspec_test.go
parent5b0ea1044ab7c14e11489bc6c612bb7f2e5a023e (diff)
downloaddexon-3a540425a3d7fc29233b5cd3e7b79b4866f35d57.tar.gz
dexon-3a540425a3d7fc29233b5cd3e7b79b4866f35d57.tar.zst
dexon-3a540425a3d7fc29233b5cd3e7b79b4866f35d57.zip
reorg:
- statereg methods move to natspec/resolver/docserver - fix failing test on invalid js input
Diffstat (limited to 'common/natspec/natspec_test.go')
-rw-r--r--common/natspec/natspec_test.go16
1 files changed, 5 insertions, 11 deletions
diff --git a/common/natspec/natspec_test.go b/common/natspec/natspec_test.go
index ac894e9b1..35a59469a 100644
--- a/common/natspec/natspec_test.go
+++ b/common/natspec/natspec_test.go
@@ -107,29 +107,23 @@ func TestMissingMethod(t *testing.T) {
}
// test invalid desc
-/*
+
func TestInvalidDesc(t *testing.T) {
desc := "Will multiply 122 by \"7\" and return 854."
- expected := "natspec.js error setting expression: (anonymous): Line 1:41 Unexpected number"
+ expected := "invalid character '7' after object key:value pair"
userdoc := makeUserdoc(desc)
- ns, err := NewWithDocs(abi, userdoc, tx)
- if err != nil {
- t.Errorf("New: error: %v", err)
- }
- notice, err := ns.Notice()
-
+ _, err := NewWithDocs(abi, userdoc, tx)
if err == nil {
- t.Errorf("expected error, got nothing (notice: '%v')", err, notice)
+ t.Errorf("expected error, got nothing", err)
} else {
if err.Error() != expected {
- t.Errorf("expected error '%s' got '%v' (notice: '%v')", expected, err, notice)
+ t.Errorf("expected error '%s' got '%v'", expected, err)
}
}
}
-*/
// test wrong input params
func TestWrongInputParams(t *testing.T) {