summaryrefslogtreecommitdiff
path: root/test/handler/test_verilator_handler.vader
blob: 59ec1361b98cf87b7273813c3509f81bf9c47251 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
Before:
  runtime ale_linters/verilog/verilator.vim

After:
  call ale#linter#Reset()


Execute (The verilator handler should parse legacy messages with only line numbers):
  AssertEqual
  \ [
  \   {
  \     'lnum': 3,
  \     'type': 'E',
  \     'text': 'syntax error, unexpected IDENTIFIER',
  \     'filename': 'foo.v'
  \   },
  \   {
  \     'lnum': 10,
  \     'type': 'W',
  \     'text': 'Blocking assignments (=) in sequential (flop or latch) block; suggest delayed assignments (<=).',
  \     'filename': 'bar.v'
  \   },
  \ ],
  \ ale_linters#verilog#verilator#Handle(bufnr(''), [
  \ '%Error: foo.v:3: syntax error, unexpected IDENTIFIER',
  \ '%Warning-BLKSEQ: bar.v:10: Blocking assignments (=) in sequential (flop or latch) block; suggest delayed assignments (<=).',
  \ ])


Execute (The verilator handler should parse new format messages with line and column numbers):
  AssertEqual
  \ [
  \   {
  \     'lnum': 3,
  \     'col' : 1,
  \     'type': 'E',
  \     'text': 'syntax error, unexpected endmodule, expecting ;',
  \     'filename': 'bar.v'
  \   },
  \   {
  \     'lnum': 4,
  \     'col' : 6,
  \     'type': 'W',
  \     'text': 'Signal is not used: r',
  \     'filename': 'foo.v'
  \   },
  \ ],
  \ ale_linters#verilog#verilator#Handle(bufnr(''), [
  \ '%Error: bar.v:3:1: syntax error, unexpected endmodule, expecting ;',
  \ '%Warning-UNUSED: foo.v:4:6: Signal is not used: r',
  \ ])