include new minified natspec with RE fix; fix test for the improved error messages

This commit is contained in:
zelig committed 2015-03-12 19:08:30 +07:00
1 parent 31a95151c9
commit 4342fe0f22
2 files changed
+13 -3529

No files matched your search

File diff suppressed because it is too large. Load diff
+11 -11
View File
@@ -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)