ppTests resetall
This commit is contained in:
parent
c56c6a965b
commit
3c693d0d68
@ -1551,6 +1551,23 @@ mod tests {
|
|||||||
);
|
);
|
||||||
} // }}}
|
} // }}}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn resetall() { // {{{
|
||||||
|
let include_paths = [testfile_path("")];
|
||||||
|
let (ret, _) = preprocess(
|
||||||
|
testfile_path("resetall.sv"),
|
||||||
|
&HashMap::new(),
|
||||||
|
&include_paths,
|
||||||
|
false,
|
||||||
|
false,
|
||||||
|
)
|
||||||
|
.unwrap();
|
||||||
|
assert_eq!(
|
||||||
|
ret.text(),
|
||||||
|
testfile_contents("resetall.sv")
|
||||||
|
);
|
||||||
|
} // }}}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn timescale() { // {{{
|
fn timescale() { // {{{
|
||||||
let include_paths = [testfile_path("")];
|
let include_paths = [testfile_path("")];
|
||||||
|
16
sv-parser-pp/testcases/resetall.sv
Normal file
16
sv-parser-pp/testcases/resetall.sv
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
// IEEE1800-2017 Clause 22.3
|
||||||
|
// When `resetall compiler directive is encountered during compilation, all
|
||||||
|
// compiler directives are set to the default values. This is useful for
|
||||||
|
// ensuring that only directives that are desired in compiling a particular
|
||||||
|
// source file are active.
|
||||||
|
// The recommended usage is to place `resetall at the beginning of each source
|
||||||
|
// text file, followed immediately by the directives desired in the file.
|
||||||
|
// It shall be illegal for the `resetall directive to be specified within
|
||||||
|
// a design element.
|
||||||
|
// Not all compiler directives have a default value (e.g., `define and
|
||||||
|
// `include). Directives that do not have a default are not affected by
|
||||||
|
// `resetall.
|
||||||
|
`resetall // Comment
|
||||||
|
`resetall// Comment
|
||||||
|
`resetall
|
||||||
|
// This file should be emitted from the preprocessor unchanged.
|
Loading…
x
Reference in New Issue
Block a user