mappum / DCPU-16

:floppy_disk: A javascript emulator for DCPU-16 (the computer system in Mojang's new game, 0x10c). Works in browsers and Node.
http://mappum.github.com/DCPU-16/
94 stars 18 forks source link

Set up regression testing #29

Closed krasin closed 12 years ago

krasin commented 12 years ago

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?

mappum commented 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?

krasin commented 12 years ago

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.

mappum commented 12 years ago

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.

mappum commented 12 years ago

I have a proposition for you, you should go to #0x10c on Afternet.

Twisol commented 12 years ago

@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/.

Twisol commented 12 years ago

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.

Twisol commented 12 years ago

Closing since the test suite is actively being built up, but in terms of automated testing, Travis CI may be useful in the future.