improvement78 Testcase for Error:DefineArgNotFound.

This commit is contained in:
damc 2023-02-07 18:30:59 +01:00
parent f0aa7c5a5c
commit 1ee6215934
2 changed files with 21 additions and 0 deletions

View File

@ -1097,6 +1097,22 @@ mod tests {
};
} // }}}
#[test]
#[allow(non_snake_case)]
fn err_DefineArgNotFound() { // {{{
match preprocess_usualargs("err_DefineArgNotFound.sv").unwrap_err() {
Error::DefineArgNotFound(identifier) => {
assert_eq!(
identifier,
String::from("c")
);
}
_ => {
panic!("Error::DefineArgNotFound not raised.");
}
};
} // }}}
#[test]
#[allow(non_snake_case)]
fn IEEE18002017_keywords_if2_13642005() { // {{{

View File

@ -0,0 +1,5 @@
/* IEEE1800-2017 Clause 22.5.1 top of page 678
*/
`define MACRO1(a=5,b="B",c) $display(a,,b,,c);
`MACRO1(1) // Macro called without required argument `c`.