It seems that unit testing has become all the rage these days and I know many of you are going to think: "Well why not just use language X with framework Y already?" But I'm proposing this idea more as a proof of concept, or out of nostalgic remembrance for my earlier years with computer programming.
I'm namely working on BSD running on x86 with NASM, and have mulled over the use of shell scripting with expect(1) to do unit testing but I wanted to know beforehand:
What unit testing frameworks are available for applications written in x86 assembly?
If your assembler routines have or can be given a 'C' interface, then any C/C++ unit testing framework can be employed.
You should move the vast majority of your application into a library which can be called from 'C' programs (ie a testing framework). To finally build your application you write an assembler front-end that just calls your new library.
IMHO The notion of unit testing is not applicable to low-level languages such as assemblers. Unit testing associates with testing unit functionality of a method, class, procedure. In my opinion such things do not exist in assembly code - of course, it is possible to declare procedures in some assemblers (it was possible in TASM and MASM), but they are not something that do exist in machine code.
However, I think that we still can consider automated testing of assembly code. Personally, I haven't heard of any framework that would allow that.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With