mruby/mruby — pull request #131 by bovi (2012-05-14 12:39:59+00:00)
Title: mrit - Embeddable Ruby ISO Test

I was thinking about the current test situation of mruby. I know it is still a very early version but maybe specially due to that, it is a good idea to start to think about test coverage of the implementation. I saw the great pull request of k-tsj (https://github.com/mruby/mruby/pull/119) which aims to include the bootstrap tests of CRuby. As k-tsj pointed out there is the problem that you need to have a ruby installed on the system.

Now I was thinking and I came up with the idea of creating a tool which actually compiles all test cases into a binary. This binary could then be deployed to each new system/plattform without any dependencies (except mruby's dependencies) and could be executed.

I have prepared a patch which contains the following things:
- *test/Makefile* compiles all *.rb files into *lib/libmrit.a*
- *tool/mrit* a tool which includes *lib/libmrit.a* and executes all the tests during execution
- *test/_assert* some boilerplate for the test and report execution
(taken from beoran pul commit https://github.com/mruby/mruby/pull/94)
- *test/array.rb* some first test cases for the Array implementation
- *test/time.rb* some first test cases for the Time implementation
(taken from beoran pul commit https://github.com/mruby/mruby/pull/94)
- *Makefile* add the target mrit, so that the default build never breaks

I love to have feedback. If you think this is a good idea I improve the test coverage. If you think it is a bad idea I love to hear your improvement comments and hope we can work out a better solution.