Skip to content

Add option to support unit tests #28

Description

@stefandrissen

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions