ppTests mv macro_identifier
This commit is contained in:
parent
3e8db79d51
commit
e966beb51e
@ -1159,9 +1159,9 @@ mod tests {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn macro_backslash() {
|
fn macro_identifier() {
|
||||||
let (ret, _) = preprocess(
|
let (ret, _) = preprocess(
|
||||||
testfile_path("test16.sv"),
|
testfile_path("macro_identifier.sv"),
|
||||||
&HashMap::new(),
|
&HashMap::new(),
|
||||||
&[] as &[String],
|
&[] as &[String],
|
||||||
false,
|
false,
|
||||||
@ -1170,7 +1170,7 @@ mod tests {
|
|||||||
.unwrap();
|
.unwrap();
|
||||||
assert_eq!(
|
assert_eq!(
|
||||||
ret.text(),
|
ret.text(),
|
||||||
testfile_contents("expected/macro_backslash")
|
testfile_contents("expected/macro_identifier.sv")
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,10 +0,0 @@
|
|||||||
module a;
|
|
||||||
`define HELLO0 "HELLO"
|
|
||||||
`define \HELLO1 "HELLO"
|
|
||||||
initial begin
|
|
||||||
$display("HELLO" );
|
|
||||||
$display("HELLO" );
|
|
||||||
$display("HELLO" );
|
|
||||||
$display("HELLO" );
|
|
||||||
end
|
|
||||||
endmodule
|
|
10
sv-parser-pp/testcases/expected/macro_identifier.sv
Normal file
10
sv-parser-pp/testcases/expected/macro_identifier.sv
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
module a;
|
||||||
|
`define A "aaa"
|
||||||
|
`define \B "bbb"
|
||||||
|
initial begin
|
||||||
|
$display("aaa");
|
||||||
|
$display("aaa");
|
||||||
|
$display("bbb");
|
||||||
|
$display("bbb");
|
||||||
|
end
|
||||||
|
endmodule
|
10
sv-parser-pp/testcases/macro_identifier.sv
Normal file
10
sv-parser-pp/testcases/macro_identifier.sv
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
module a;
|
||||||
|
`define A "aaa"
|
||||||
|
`define \B "bbb"
|
||||||
|
initial begin
|
||||||
|
$display(`A);
|
||||||
|
$display(`\A );
|
||||||
|
$display(`B);
|
||||||
|
$display(`\B );
|
||||||
|
end
|
||||||
|
endmodule
|
@ -1,10 +0,0 @@
|
|||||||
module a;
|
|
||||||
`define HELLO0 "HELLO"
|
|
||||||
`define \HELLO1 "HELLO"
|
|
||||||
initial begin
|
|
||||||
$display(`HELLO0);
|
|
||||||
$display(`\HELLO0 );
|
|
||||||
$display(`HELLO1);
|
|
||||||
$display(`\HELLO1 );
|
|
||||||
end
|
|
||||||
endmodule
|
|
Loading…
x
Reference in New Issue
Block a user