Skip to content

Commit

Permalink
add simulator_check to vunit/test/common.py
Browse files Browse the repository at this point in the history
  • Loading branch information
umarcor committed Apr 20, 2019
1 parent 59f35f2 commit f113472
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions vunit/test/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,16 @@ def simulator_is(*names):
return SIMULATOR_FACTORY.select_simulator().name in names


def simulator_check(func):
"""
Check some method of the selected simulator
"""
simif = SIMULATOR_FACTORY.select_simulator()
if simif is None:
return False
return func(simif)


def check_report(report_file, tests=None):
"""
Check an XML report_file for the exact occurrence of specific test results
Expand Down

0 comments on commit f113472

Please sign in to comment.