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")
|
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
|
// IEEE1800-2017 Clause 22.5.3
|
||||||
// The directive `undef shall undefine the specified text macro if previously
|
// The directive `undefineall directive shall undefine all text macros
|
||||||
// defined by a `define compiler directive within the compilation unit. An
|
// previously defined by `define compiler directives within the compilation
|
||||||
// attempt to undefine a text macro that was not previously defined using a
|
// unit. This directive takes no argument and may appear anywhere in the source
|
||||||
// `define compiler directive can issue a warning.
|
// description.
|
||||||
`undef FOO
|
`undefineall
|
||||||
`undef FOO// Comment
|
`undefineall// Comment
|
||||||
`undef FOO // Comment
|
`undefineall // Comment
|
||||||
|
|
||||||
`define FOO foo
|
`define FOO foo
|
||||||
`define BAR bar
|
`define BAR bar
|
||||||
|
Loading…
x
Reference in New Issue
Block a user