diff --git a/sv-parser-pp/src/preprocess.rs b/sv-parser-pp/src/preprocess.rs index c36dea3..9bfcaa6 100644 --- a/sv-parser-pp/src/preprocess.rs +++ b/sv-parser-pp/src/preprocess.rs @@ -1111,9 +1111,9 @@ mod tests { } #[test] - fn macro_with_comment() { + fn macro_comment() { let (ret, _) = preprocess( - testfile_path("test13.sv"), + testfile_path("macro_comment.sv"), &HashMap::new(), &[] as &[String], false, @@ -1122,7 +1122,7 @@ mod tests { .unwrap(); assert_eq!( ret.text(), - testfile_contents("expected/macro_with_comment") + testfile_contents("expected/macro_comment.sv") ); } diff --git a/sv-parser-pp/testcases/expected/macro_comment.sv b/sv-parser-pp/testcases/expected/macro_comment.sv new file mode 100644 index 0000000..836e665 --- /dev/null +++ b/sv-parser-pp/testcases/expected/macro_comment.sv @@ -0,0 +1,2 @@ +`define A 42 // Comment +interface i #(p = 42) (); endinterface diff --git a/sv-parser-pp/testcases/expected/macro_with_comment b/sv-parser-pp/testcases/expected/macro_with_comment deleted file mode 100644 index 141f2f3..0000000 --- a/sv-parser-pp/testcases/expected/macro_with_comment +++ /dev/null @@ -1,3 +0,0 @@ -`define NAME 42 // Comment -interface foo #(WIDTH = 42 ) (); -endinterface diff --git a/sv-parser-pp/testcases/macro_comment.sv b/sv-parser-pp/testcases/macro_comment.sv new file mode 100644 index 0000000..2adacc4 --- /dev/null +++ b/sv-parser-pp/testcases/macro_comment.sv @@ -0,0 +1,2 @@ +`define A 42 // Comment +interface i #(p = `A) (); endinterface diff --git a/sv-parser-pp/testcases/test13.sv b/sv-parser-pp/testcases/test13.sv deleted file mode 100644 index cda8549..0000000 --- a/sv-parser-pp/testcases/test13.sv +++ /dev/null @@ -1,3 +0,0 @@ -`define NAME 42 // Comment -interface foo #(WIDTH = `NAME) (); -endinterface