Latest changes are pushed to https://github.com/jayrm/fbc/tree/fbcunit
I haven't made a pull request yet, as I am trying to do a test in a DOS build. So far I have tested latest fbcunit branch in win32 gas/gcc, win64 gcc, and Linux 64 gcc (slackware 14.1 64-bit actually).
I added the UNITTEST_RUN_ARGS="..." option. It works, but I think it is wrong way to solve this. I need more time to figure this one out. For your interest, hopefully I can explain why.
- yes, old fbcu (+ libcunit.a) had different execution modes, which depend on how library was built, so had to pass for example AUTO=1 to get the fbcu wrapper when building to get tests to run a certain way.
- ideally, the makefile should be targets, prerequisites, & recipes, nothing else. The top-level ./tests/Makefile mostly dispatches commands, which could just as easily be done in a shell script.
- unit-tests.mk is more like a makefile should be. For example, you can build a single target `make -f unit-tests.mk pp/hello.o' it will take the needed steps to get there
- currently production of `make unit-tests' is an exit code. yes, it does print some stuff to the console for the user's benefit, but in the end either we either get an exitcode=0 for success or exitcode=1 for failure.
- so for the xml file generation, it should be rewritten as a target in the makefile, IMO.
I will leave the UNITTEST_RUN_ARGS="..." option there for now, and I will change and/or remove it later. Also, cunit-tests target will still work, but is deprecated. Use 'unit-tests' instead.
fbcu.bi compatibility header is still in use. Next step is to review the .bas test source files, and for consistency, rewrite using the framework's SUITE() and TEST() macros.