Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ; UNIT TEST EXAMPLE
- .prereq NONE ; will not be executed in any unit test
- SET A, [0x8000]
- .prereq ALL ; will be executed before all unit tests
- SET B, 10
- ADD A, B
- .test Test1 ; Removed from normal output
- SET C, 0x1234
- .assert A == [B + 0x8000]
- .assert B != 24
- .dump screen dump.bmp
- .log Stuff and stuffy stuff
- .endtest
- >organic example.dasm --export-tests tests.unit
- >dunit tests.unit run Test1
- [0x1234] ASSERT A == [B + 0x8000] PASS
- [0x1234] ASSERT B != 24 FAIL {Expected: 24; Actual: 25}
- [0x1234] DUMP SCREEN to dump.bmp DONE
- [0x1234] LOG Stuff and stuffy stuff
- TESTS COMPLETE
- 0/1 PASS (0%)
Advertisement
Add Comment
Please, Sign In to add comment