Unit Test Checklist - nosnhojn/uvm-utest GitHub Wiki

  • all unit tests fail for exactly 1 reason
  • 4 phase test pattern of set -> execute -> verify -> teardown
  • our tests have to read like poetry... they're rhythmical and a joy to peruse
  • every line of code is locked down
  • properties are initialized to intended state at construction
  • methods function as intended
  • default arguments are locked down
  • virtual members are locked down
  • static members (properties and methods/functions/tasks) are locked down
  • run code coverage on the results
  • unit tests that lock down questionable functionality (i.e. the intent of a particular feature doesn't make sense but we verify it anyway) are marked as WARNING like this:

WARNING TEST

  • unit tests that fail because the intention of the existing code looks wrong are commented out and include a comment like this:

FAILING TEST