flat assembler
Message board for the users of flat assembler.
Index
> Projects and Ideas > Automatic unit tests for FASM projects. |
Author |
|
AsmGuru62 08 Jan 2013, 23:45
Very cool idea!
I would define a procedure as something, which has input and output. Without these terms - we can't test the procedure. Even if procedure somehow changes the state of global variables - it is still an output. However, how to test the functions, which supposed to draw something on screen. Say, I have a function called "Line": Code: stdcall Line, 100, 100, 389, 14 How to write a unit test which would prove that line was indeed drawn from point (100,100) to point (389,14) and not to (388,14)? Pretty hard. However, most of the code can be considered testable. Also, unit test code should be included into some kind of conditional assembly, to be switched ON/OFF as desired. But the idea is very cool. |
|||
08 Jan 2013, 23:45 |
|
JohnFound 09 Jan 2013, 00:01
The graphics procedures and all other memory processing procedures can be easy tested, comparing the result memory block with some reference memory block produced by some other way.
|
|||
09 Jan 2013, 00:01 |
|
TmX 10 Jan 2013, 02:59
Yes, unit testing is used nowadays in application development (some programming languages even has built-in unit testing mechanism), and it would be cool if such thing also available for assembly.
Actually it's not related to OOP. There is CUnit (unit testing for C), for example: http://cunit.sourceforge.net/example.html |
|||
10 Jan 2013, 02:59 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.