Skip to content

Test coverage: event handling (cross, above, timer) #52

@robtaylor

Description

@robtaylor

Summary

Analog event control statements have limited test coverage, and some are documented as not yet implemented.

Current Status

From documentation:

  • @(initial_step), @(final_step) - supported
  • Named events (@foo) - not supported
  • Monitored events (@(cross(...))) - not supported
  • Or events - not supported

Missing Test Coverage

Even for supported events, dedicated tests are limited:

Supported features needing tests

  • @(initial_step) - Basic and conditional usage
  • @(final_step) - Cleanup/finalization code
  • Multiple initial_step blocks in same module

Features to test when implemented

  • cross(expr, direction) - Zero crossing detection
  • above(expr, threshold) - Threshold crossing
  • Timer events

Current State

  • No dedicated test files for event handling in openvaf/test_data/
  • Events may be tested indirectly through integration tests

Suggested Action

  1. Add explicit tests for initial_step and final_step behavior
  2. Add UI tests for proper error messages when unsupported events are used
  3. When implementing new events, add comprehensive tests

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions