c64unitPrint page

Last updated: 2018-08-30

Test your code within any cross-assembler of your choice. Make assertions, test sets of data, mock your methods, all in one unit test framework. Make your code better, and simply enjoy developing!

Potentially, c64unit test framework allows you to test your code within any cross-assembler of your choice. The package itself is a compiled binary, which can be accessed by any other cross-assembler. And with few handy macros in a toolbox, testing your code is just simple!

You can find the package here: https://bitbucket.org/Commocore/c64unit

Currently c64unit is in beta version 0.65.

To see c64unit in action, please visit examples repository: https://bitbucket.org/Commocore/c64unit-examples.


Features.

  • uses macros so writing tests requires only few lines of test code, and hides internal framework's mechanisms
  • no variables used on zero-page, so code can be tested freely
  • most common cross-assemblers supported so far, and opened to extension
  • you can examine your function against different conditions - use Data Sets to initialize any number of conditions on fly like zero page addresses, other memory locations or just by passing A, X, Y registers
  • forget about writing assertions over and over again for each case, Data Sets allow not only to initialize, but also to assert multiple set of data dynamically, up to 256 byte values per table, or 128 word values per table
  • you can mock methods, which means you can test your code in isolation, create stubs, skip loading data from disk and much more
  • you can assert not only values or memory addresses, but also flag statuses like carry flag, negative flag and so on


Cross-assembler support.

Macros implementation is supported by the following cross-assemblers:
- 64tass
- DASM
- Kick Assembler
- ACME
- ca65
- xa65

If cross-assembler of your choice is not supported yet, let us know! We're more than happy to add the support by providing handy macros for your cross-assembler. You can still use c64unit binary to call functions, just open any existing macros implementation for a reference. But let us know anyway, we will add the support no matter what!

c64unit for C language.

c64unit test framework helps to test also programs written in C language (cc65). Please visit https://bitbucket.org/Commocore/c64unit-for-c to get the latest version, and check out examples in this repository: https://bitbucket.org/Commocore/c64unit-for-c-examples.

We want to support you, please support us!

c64unit is designed to help you to work on your projects with ease, to eliminate doubtness and frustration, to change the code without breaking behaviours and side effects, to enjoy refactors and optimizations. c64unit needs your love. If you'll notice any issue, please report it here or just contact us. Let us know if you like this framework, share your experience and spread the word!

Copyright © 2011-2018 Commocore.
All rights reserved.