Hi guys, Sorry to spam you on this sunny sunday morning ;)
As you may have seen, I created a file called serial_testconsole.jal. It provides an framework to run different unit tests on a target system. The tests are triggered via the serial port. How does it work? Well, first you create some tests you want to execute: include a board file (or name it a test file) include serial_tc_header -- optional - only required if you want to use the test vars (see below) then: const byte testname_a[] = "clear screen" procedure unit_test_a() is lcd_clear_screen() end procedure where testname_* is a string that gives you info about the test. You can leave it out if you don't need it or want to save program space. It is printed when you start the test. The procedure unit_test_* is the code executed. And as you might have guessed, * represents a char [a...z], case insensitive, that triggers the test. So up to 26 test can be defined at the same time. In addition to this, there is (some preliminary) support for maintenance of test vars. There is an array of 10 vars: var word tc_var[10] each of which can also be addressed directly: var word tc_var0 at tc_var[0] These values can be maintained from the keyboard: -- ! selects this menu -- ` exits this menu -- space print all vars -- 0..9 select var -- + increment var by 1 -- = increment var by 1 (= is unshifted plus on my keyboard) -- - decrement var by 1 When done defining the unit test: include serial_testconsole testconsole_init() tc_var2 = 1 -- optionally change default value 0 of tc-var testconsole() -- contains forever loop And you are done. (See test_display_hd44780_4.jal for a working example) The reason I created this is the increasing amount of repeating work to create tests. And for me, testing on a target system is the way to go. I don't like testing with emulators and don't use ICD's or breakpoints. My question to you is if this is something you want to use yourself. So let me know what you think! Joep --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "jallib" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/jallib?hl=en -~----------~----~----~----~------~----~------~--~---
