Guidelines and tips for writing unit tests - theolind/mahm3lib GitHub Wiki

This document shall have a main focus on software-based unit testing. Suggestions on hardware testing is allowed, but they must be explicitly specified to avoid confusion with software testing.

This is only a first draft of this document. Please contribute if you think something's missing.

Testing digital I/O

Is digital pin set to high level?

  1. Make sure pin has low level (read register)
  2. Use API to set pin to high level
  3. Make sure pin has high level (read register)

Additional hardware testing: Measure pin levels with a multimeter or LED.

⚠️ **GitHub.com Fallback** ⚠️