Closed krasin closed 12 years ago
That would be cool. I'm more familiar with node, so I was thinking about making it cross-compatible and releasing it as a node module, then I could make a test script. I guess I can do some in-browser tests, too. The only browser specific thing I am doing right now is the cycle recursion (how I call the next tick, a while loop wopuld freeze the webpage), so it is an easy port.
You have BRK
in your tests, did other compilers implement that?
If you implemented a Node or D8 test runner for these tests, I would like to setup an automated test farm. So, in-browser tests are less convenient (and they would be flaky, by my experience)
Other assemblers may replace BRK with any instruction (or a sequence) they use for this purpose.
Notch should host the DCPU servers running this on Node. :D WIth the asynchronicity, it would run very well because one core could handle way more than 1 CPU worth of cycles.
I have a proposition for you, you should go to #0x10c on Afternet.
@mappum: I've been busy so I forgot to mention, but the community seems to have coalesced around #0x10c and #0x10c-dev on Freenode instead of Afternet. Freenode banned Mibbit, but you can use http://webchat.freenode.net/.
Unit testing is set up now, though there isn't complete code coverage. I don't know about a farm... it seems unnecessary considering the small size of the project, and how easy it is to just run expresso
.
In order to be sure that all fixed bugs are fixed, it's usually convenient to have regression tests.
One of the option is to use d8 shell from http://code.google.com/p/v8/ and run it on tests from https://github.com/krasin/dcpu16-tests/tree/master/asm
What's your opinion?