SirCmpwn

Untitled

Jun 1st, 2012
49
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.61 KB | None | 0 0
  1. ; UNIT TEST EXAMPLE
  2.  
  3. .prereq NONE ; will not be executed in any unit test
  4. SET A, [0x8000]
  5.  
  6. .prereq ALL ; will be executed before all unit tests
  7. SET B, 10
  8. ADD A, B
  9.  
  10. .test Test1 ; Removed from normal output
  11. SET C, 0x1234
  12. .assert A == [B + 0x8000]
  13. .assert B != 24
  14. .dump screen dump.bmp
  15. .log Stuff and stuffy stuff
  16. .endtest
  17.  
  18. >organic example.dasm --export-tests tests.unit
  19. >dunit tests.unit run Test1
  20. [0x1234] ASSERT A == [B + 0x8000] PASS
  21. [0x1234] ASSERT B != 24 FAIL {Expected: 24; Actual: 25}
  22. [0x1234] DUMP SCREEN to dump.bmp DONE
  23. [0x1234] LOG Stuff and stuffy stuff
  24.  
  25. TESTS COMPLETE
  26. 0/1 PASS (0%)
Advertisement
Add Comment
Please, Sign In to add comment