ppTests Add missing undefineall test.
This commit is contained in:
parent
ab4845a964
commit
edf66849ea
@ -1645,4 +1645,21 @@ mod tests {
|
||||
testfile_contents("expected/undef.sv")
|
||||
);
|
||||
} // }}}
|
||||
|
||||
#[test]
|
||||
fn undefineall() { // {{{
|
||||
let include_paths = [testfile_path("")];
|
||||
let (ret, _) = preprocess(
|
||||
testfile_path("undefineall.sv"),
|
||||
&HashMap::new(),
|
||||
&include_paths,
|
||||
false,
|
||||
false,
|
||||
)
|
||||
.unwrap();
|
||||
assert_eq!(
|
||||
ret.text(),
|
||||
testfile_contents("expected/undefineall.sv")
|
||||
);
|
||||
} // }}}
|
||||
}
|
||||
|
@ -1,11 +1,11 @@
|
||||
// IEEE1800-2017 Clause 22.5.2
|
||||
// The directive `undef shall undefine the specified text macro if previously
|
||||
// defined by a `define compiler directive within the compilation unit. An
|
||||
// attempt to undefine a text macro that was not previously defined using a
|
||||
// `define compiler directive can issue a warning.
|
||||
`undef FOO
|
||||
`undef FOO// Comment
|
||||
`undef FOO // Comment
|
||||
// IEEE1800-2017 Clause 22.5.3
|
||||
// The directive `undefineall directive shall undefine all text macros
|
||||
// previously defined by `define compiler directives within the compilation
|
||||
// unit. This directive takes no argument and may appear anywhere in the source
|
||||
// description.
|
||||
`undefineall
|
||||
`undefineall// Comment
|
||||
`undefineall // Comment
|
||||
|
||||
`define FOO foo
|
||||
`define BAR bar
|
||||
|
Loading…
x
Reference in New Issue
Block a user