Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
Geth-Modification
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
张蕾
Geth-Modification
Commits
ccda1aac
Commit
ccda1aac
authored
Mar 13, 2015
by
obscuren
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'develop' of github.com-obscure:ethereum/go-ethereum into develop
parents
03403399
a76d55c8
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
3529 deletions
+13
-3529
natspec_js.go
ethutil/natspec/natspec_js.go
+2
-3518
natspec_test.go
ethutil/natspec/natspec_test.go
+11
-11
No files found.
ethutil/natspec/natspec_js.go
View file @
ccda1aac
This source diff could not be displayed because it is too large. You can
view the blob
instead.
ethutil/natspec/natspec_test.go
View file @
ccda1aac
...
@@ -69,22 +69,22 @@ func TestNotice(t *testing.T) {
...
@@ -69,22 +69,22 @@ func TestNotice(t *testing.T) {
}
}
// https://github.com/ethereum/natspec.js/issues/1
// https://github.com/ethereum/natspec.js/issues/1
//
badDesc := "Will multiply `e` by 7 and return `a * 7`."
badDesc
:=
"Will multiply `e` by 7 and return `a * 7`."
//
notice, err = ns.Notice(tx, abi, method, badDesc)
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 {
if
err
==
nil
{
//
t.Errorf("expected error, got nothing (notice: '%v')", notice)
t
.
Errorf
(
"expected error, got nothing (notice: '%v')"
,
notice
)
//
} else {
}
else
{
//
if err.Error() != expected {
if
err
.
Error
()
!=
expected
{
//
t.Errorf("expected error '%s' got '%v' (notice: '%v')", expected, err, notice)
t
.
Errorf
(
"expected error '%s' got '%v' (notice: '%v')"
,
expected
,
err
,
notice
)
//
}
}
//
}
}
notice
,
err
=
ns
.
Notice
(
tx
,
abi
,
"missing_method"
,
desc
)
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
{
if
err
==
nil
{
t
.
Errorf
(
"expected error, got nothing (notice: '%v')"
,
notice
)
t
.
Errorf
(
"expected error, got nothing (notice: '%v')"
,
notice
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment