Add regression test for macros with multi-line comments
Check that multi-line comments are supported in macros. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
This commit is contained in:
parent
109b794253
commit
8187bf58f7
|
|
@ -0,0 +1,23 @@
|
|||
// Check that multi-line comments in macros are supported. Including some corner
|
||||
// cases like another comment start in the comment.
|
||||
|
||||
`define test(a, b, c) \
|
||||
(a + /* these is some \
|
||||
multi line */ b /* comment \
|
||||
that goes on \
|
||||
and on */ ) /* and some more \
|
||||
\
|
||||
// and even has a comments \
|
||||
/* in the comment */ * c
|
||||
|
||||
module test;
|
||||
|
||||
initial begin
|
||||
if (`test(1, 2, 3) === 9) begin
|
||||
$display("PASSED");
|
||||
end else begin
|
||||
$display("FAILED");
|
||||
end
|
||||
end
|
||||
|
||||
endmodule
|
||||
|
|
@ -638,6 +638,7 @@ macro_args CO,-yivltests ivltests
|
|||
macro_comment1 normal ivltests
|
||||
macro_comment2 normal ivltests
|
||||
macro_comment3 normal ivltests
|
||||
macro_comment_multiline normal ivltests
|
||||
macro_redefinition normal,-Wmacro-redefinition ivltests gold=macro_redefinition.gold
|
||||
macro_replacement normal,-Wmacro-replacement ivltests gold=macro_replacement.gold
|
||||
macsub normal ivltests
|
||||
|
|
|
|||
Loading…
Reference in New Issue