Currently I am writing unit tests for every module I write.
From pyz80 the tests are wrapped in conditional assembly blocks witth if defined(unittest).
The tests indicate success or failure by putting either 200 (ok) or 500 (failure) in the bc register. This allows print usr 32768 to show the status of the test.
But... this requires:
- build
load 1
print usr 32768
Which is fine when writing the code initially, but no good for continuous automated testing.
A command-line option like -unittest which returns the value of bc (or something else) could really help.
Currently I am writing unit tests for every module I write.
From pyz80 the tests are wrapped in conditional assembly blocks witth
if defined(unittest).The tests indicate success or failure by putting either 200 (ok) or 500 (failure) in the
bcregister. This allowsprint usr 32768to show the status of the test.But... this requires:
load 1print usr 32768Which is fine when writing the code initially, but no good for continuous automated testing.
A command-line option like
-unittestwhich returns the value ofbc(or something else) could really help.