Code And Cocktails

Writing a Unit Test Framework in a Language You Are Trying to Learn

| Comments

Tonight's session of the Boston Software Craftsmanship[1] meetup was about
playing with the Io language[2]. I didn't know anything about it before
it was announced as the topic for the next meeting.

A couple weeks ago I started googling and trying to learn the language.
I tried finding a unit testing framework given my interest in TDD, but
didn't find anything (my lack of ability to search for anything was a
trend here). So I decide to try writing one on my own. Perhaps I was
remembering Kent Beck's example of this in his book[3].

Even with my lack of search skills I feel that I learned some
interesting things about the language. I think if I spent more than
one and a half hours at it, and if my searching had been useful, I could
have gotten farther.

I think that I will make this a pattern for me. Right after "Hello
World" I'll play with a unit testing framework.

At the session tonight we ended up ganging up on my little framework and
taking some of the next steps to improve it. It may not grow anymore -
but it has served its purpose.

My basic unit test framework for the Io language can be found on
github[4]. (But Io does seem to have its own unit test framework built
in, but it is hard to find (.../libs/iovm/io/UnitTest.io).
It is built right into the VM, use it instead of mine please).


Footnotes: [1] http://groups.google.com/group/boston-software-craftsmanship

[2] http://iolanguage.com

[3] http://www.amazon.com/Test-Driven-Development-Kent-Beck/dp/0321146530

[4] https://github.com/verdammelt/iounit