diff options
author | Kimplul <kimi.h.kuparinen@gmail.com> | 2020-08-29 15:03:26 +0300 |
---|---|---|
committer | Kimplul <kimi.h.kuparinen@gmail.com> | 2020-08-29 15:17:20 +0300 |
commit | d9a7d6bc231b699fbd103e3af6edbcdaa7ed6f91 (patch) | |
tree | 408473569da0805ad16ea323b333cb9cba13c0eb /test/handler | |
parent | 06264c264fbaea182141ba129c7182af094e1c04 (diff) | |
download | ale-d9a7d6bc231b699fbd103e3af6edbcdaa7ed6f91.zip |
Improved macro handling in gcc
Diffstat (limited to 'test/handler')
-rw-r--r-- | test/handler/test_gcc_handler.vader | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/test/handler/test_gcc_handler.vader b/test/handler/test_gcc_handler.vader index b67483a6..a4231cab 100644 --- a/test/handler/test_gcc_handler.vader +++ b/test/handler/test_gcc_handler.vader @@ -279,3 +279,38 @@ Execute(The GCC handler should handle errors for inlined header functions): \ ' __open_too_many_args ();', \ ' ^~~~~~~~~~~~~~~~~~~~~~~', \ ]) + +Execute(The GCC handler should handle macro expansion errors in current file): + AssertEqual + \ [ + \ { + \ 'lnum': 1, + \ 'col': 19, + \ 'type': 'E', + \ 'text': 'error message', + \ 'detail': "error message\n<stdin>:1:19: note: in expansion of macro 'TEST'", + \ }, + \ ], + \ ale#handlers#gcc#HandleGCCFormatWithIncludes(347, [ + \ '<command-line>: error: error message', + \ '<stdin>:1:19: note: in expansion of macro ‘TEST’', + \ ' 1 | std::string str = TEST;', + \ ' | ^~~~', + \ ]) + +Execute(The GCC handler should handle macro expansion errors in other files): + AssertEqual + \ [ + \ { + \ 'lnum': 0, + \ 'type': 'E', + \ 'text': 'Error found in macro expansion. See :ALEDetail', + \ 'detail': "error message\ninc.h:1:19: note: in expansion of macro 'TEST'", + \ }, + \ ], + \ ale#handlers#gcc#HandleGCCFormatWithIncludes(347, [ + \ '<command-line>: error: error message', + \ 'inc.h:1:19: note: in expansion of macro ‘TEST’', + \ ' 1 | std::string str = TEST;', + \ ' | ^~~~', + \ ]) |