ppTests Add missing IEEE18002017_* tests.

This commit is contained in:
damc 2022-07-21 13:45:42 +02:00
parent d1e6f6e6af
commit f927aee299

View File

@ -898,6 +898,40 @@ mod tests {
);
}
#[test]
#[allow(non_snake_case)]
fn IEEE18002017_macro_argument_expansion() {
let (ret, _) = preprocess(
testfile_path("IEEE18002017_macro_argument_expansion.sv"),
&HashMap::new(),
&[] as &[String],
false,
false,
)
.unwrap();
assert_eq!(
ret.text(),
testfile_contents("expected/IEEE18002017_macro_argument_expansion.sv")
);
}
#[test]
#[allow(non_snake_case)]
fn IEEE18002017_macro_delimit_tokens() {
let (ret, _) = preprocess(
testfile_path("IEEE18002017_macro_delimit_tokens.sv"),
&HashMap::new(),
&[] as &[String],
false,
false,
)
.unwrap();
assert_eq!(
ret.text(),
testfile_contents("expected/IEEE18002017_macro_delimit_tokens.sv")
);
}
#[test]
#[allow(non_snake_case)]
fn IEEE18002017_macro_mix_quotes() {
@ -932,6 +966,40 @@ mod tests {
);
}
#[test]
#[allow(non_snake_case)]
fn IEEE18002017_macro_with_defaults() {
let (ret, _) = preprocess(
testfile_path("IEEE18002017_macro_with_defaults.sv"),
&HashMap::new(),
&[] as &[String],
false,
false,
)
.unwrap();
assert_eq!(
ret.text(),
testfile_contents("expected/IEEE18002017_macro_with_defaults.sv")
);
}
#[test]
#[allow(non_snake_case)]
fn IEEE18002017_macro_without_defaults() {
let (ret, _) = preprocess(
testfile_path("IEEE18002017_macro_without_defaults.sv"),
&HashMap::new(),
&[] as &[String],
false,
false,
)
.unwrap();
assert_eq!(
ret.text(),
testfile_contents("expected/IEEE18002017_macro_without_defaults.sv")
);
}
#[test]
fn ifdef_nested() {
let (ret, _) = preprocess(