summaryrefslogtreecommitdiff
path: root/test/handler/test_solhint_handler.vader
diff options
context:
space:
mode:
Diffstat (limited to 'test/handler/test_solhint_handler.vader')
-rw-r--r--test/handler/test_solhint_handler.vader28
1 files changed, 26 insertions, 2 deletions
diff --git a/test/handler/test_solhint_handler.vader b/test/handler/test_solhint_handler.vader
index a3ed5d57..f8fffb60 100644
--- a/test/handler/test_solhint_handler.vader
+++ b/test/handler/test_solhint_handler.vader
@@ -4,7 +4,7 @@ Before:
After:
call ale#linter#Reset()
-Execute(The vint handler should parse error messages correctly):
+Execute(The solhint handler should parse linter error messages correctly):
AssertEqual
\ [
\ {
@@ -50,7 +50,7 @@ Execute(The vint handler should parse error messages correctly):
\ 'type': 'E',
\ },
\ ],
- \ ale_linters#solidity#solhint#Handle(bufnr(''), [
+ \ ale#handlers#solhint#Handle(bufnr(''), [
\ 'contracts/Bounty.sol: line 1, col 17, Warning - Compiler version must be fixed (compiler-fixed)',
\ 'contracts/Bounty.sol: line 4, col 8, Error - Use double quotes for string literals (quotes)',
\ 'contracts/Bounty.sol: line 5, col 8, Error - Use double quotes for string literals (quotes)',
@@ -58,3 +58,27 @@ Execute(The vint handler should parse error messages correctly):
\ 'contracts/Bounty.sol: line 14, col 3, Error - Expected indentation of 4 spaces but found 2 (indent)',
\ 'contracts/Bounty.sol: line 47, col 3, Error - Function order is incorrect, public function can not go after internal function. (func-order)',
\ ])
+
+
+Execute(The solhint handler should parse syntax error messages correctly):
+ AssertEqual
+ \ [
+ \ {
+ \ 'lnum': 30,
+ \ 'col': 4,
+ \ 'text': "missing ';' at 'uint248'",
+ \ 'code': 'Parse error',
+ \ 'type': 'E',
+ \ },
+ \ {
+ \ 'lnum': 203,
+ \ 'col': 4,
+ \ 'text': "no viable alternative at input '_loserStakeMultiplier}'",
+ \ 'code': 'Parse error',
+ \ 'type': 'E',
+ \ },
+ \ ],
+ \ ale#handlers#solhint#Handle(bufnr(''), [
+ \ "contracts/Bounty.sol: line 30, col 4, Error - Parse error: missing ';' at 'uint248'",
+ \ "contracts/Bounty.sol: line 203, col 4, Error - Parse error: no viable alternative at input '_loserStakeMultiplier}'",
+ \ ])