I want a unit test signal generator - let it generate a simple sine wave or a modulation frequency of a signal on a sine wave. It’s easy enough to determine reasonable test parameters, and it’s well known what the result should look like “-”, but it’s quite difficult to verify.
I could do (for example) a frequency analysis at the output and verify that, check the maximum amplitude, etc., but a) it will make the test code much more complex than the code being tested, and b) it will not fully verify the output form.
Is there an established way to do this?
source
share