Summary
Preprocessor test coverage is limited to basic macro expansion scenarios.
Current State
Only 4 test cases in openvaf/preprocessor/src/tests.rs:
smoke_test - Basic ifdef/ifndef, define, multiline macros
whitespaces - Whitespace handling in macros
condition_enabled / condition_disabled - Conditional compilation
Missing Coverage
Untested directives
- `undef - Macro undefinition
- `elsif - Else-if chains
- `line - Line number control
- `FILE, `LINE - Predefined macros
- `pragma - Pragma directives
- `resetall - Reset all directives
Untested scenarios
- Nested `include (include within include)
- Include search path priority
- Circular include detection
- Macro redefinition warnings
- Macro argument edge cases (empty args, special chars)
- Line continuation edge cases
- Comment handling within macros
Error cases
- Missing include file
- Unterminated ifdef/ifndef
- Malformed macro definitions
- Recursive macro expansion
Suggested Action
- Expand preprocessor test suite with missing directive tests
- Add error case tests with expected diagnostics
- Test edge cases found in real-world Verilog-A models
Summary
Preprocessor test coverage is limited to basic macro expansion scenarios.
Current State
Only 4 test cases in
openvaf/preprocessor/src/tests.rs:smoke_test- Basic ifdef/ifndef, define, multiline macroswhitespaces- Whitespace handling in macroscondition_enabled/condition_disabled- Conditional compilationMissing Coverage
Untested directives
Untested scenarios
Error cases
Suggested Action