test_ispc_ispc_handler.vader
1 Before: 2 runtime ale_linters/ispc/ispc.vim 3 4 After: 5 call ale#linter#Reset() 6 7 Execute(The ispc handler should parse input correctly): 8 AssertEqual 9 \ [ 10 \ { 11 \ 'bufnr': 0, 12 \ 'lnum': 33, 13 \ 'col': 14, 14 \ 'type': 'E', 15 \ 'text': 'syntax error, unexpected ''int'', expecting '','' or '';''.', 16 \ }, 17 \ { 18 \ 'bufnr': 0, 19 \ 'lnum': 36, 20 \ 'col': 5, 21 \ 'type': 'E', 22 \ 'text': 'syntax error, unexpected ''for''.', 23 \ }, 24 \ { 25 \ 'bufnr': 0, 26 \ 'lnum': 51, 27 \ 'col': 9, 28 \ 'type': 'E', 29 \ 'text': '''foobar.h'' file not found', 30 \ }, 31 \ { 32 \ 'bufnr': 0, 33 \ 'lnum': 79, 34 \ 'col': 52, 35 \ 'type': 'W', 36 \ 'text': 'Modulus operator with varying types is very inefficient.', 37 \ }, 38 \ { 39 \ 'bufnr': 0, 40 \ 'lnum': 85, 41 \ 'col': 13, 42 \ 'type': 'W', 43 \ 'text': 'Undefined behavior: all program instances are writing to the same location!', 44 \ }, 45 \ { 46 \ 'bufnr': 0, 47 \ 'lnum': 93, 48 \ 'col': 19, 49 \ 'type': 'W', 50 \ 'text': 'Gather required to load value.', 51 \ }, 52 \ { 53 \ 'bufnr': 0, 54 \ 'lnum': 93, 55 \ 'col': 9, 56 \ 'type': 'W', 57 \ 'text': 'Scatter required to store value.', 58 \ }, 59 \ ], 60 \ ale_linters#ispc#ispc#Handle(0, [ 61 \ 'Warning: No output file or header file name specified. Program will be compiled and warnings/errors will be issued, but no output will be generated. ', 62 \ 'Warning: No --target specified on command-line. Using default system target "avx2-i32x8".', 63 \ 'mandelbrot.ispc:33:14: Error: syntax error, unexpected ''int'', expecting '','' or '';''.', 64 \ 'static iline int mandel(float c_re, float c_im, int count) {', 65 \ ' ^^^', 66 \ '', 67 \ 'mandelbrot.ispc:36:5: Error: syntax error, unexpected ''for''.', 68 \ ' for (i = 0; i < count; ++i) {', 69 \ ' ^^^', 70 \ '', 71 \ 'mandelbrot.ispc:51:9: fatal error: ''foobar.h'' file not found', 72 \ '#include<foobar.h>', 73 \ ' ^~~~~~~~~~', 74 \ 'mandelbrot.ispc:79:52: Performance Warning: Modulus operator with varying types is very inefficient.', 75 \ ' double x = x0 + i * (dx + epsilon*(k%2)*delta);', 76 \ ' ^^^', 77 \ '', 78 \ 'mandelbrot.ispc:85:13: Warning: Undefined behavior: all program instances are writing to the same location!', 79 \ ' output[index] = (NNN) / sample_size;', 80 \ ' ^^^^^^^^^^^^^', 81 \ '', 82 \ 'mandelbrot.ispc:93:19: Performance Warning: Gather required to load value.', 83 \ ' A[i*8] *= A[i*8];', 84 \ ' ^^^^^^', 85 \ '', 86 \ 'mandelbrot.ispc:93:9: Performance Warning: Scatter required to store value.', 87 \ ' A[i*8] *= A[i*8];', 88 \ ' ^^^^^^', 89 \ '', 90 \ ])