Micro Lightweight Unit Testing

Joe Armstrong - noreply@blogger.com (Joe Armstrong) - January 28, 2009

I’m often asked the question “what unit testing framework do you use?” The answer is usually I don’t, but I do use a form of micro testing that is built into Erlang.

In Erlang, every assignment of the form Lhs = Rhs where the Lhs is a ground-term and Rhs is a non-ground term can be viewed as an assertion, or unit test, since it can possibly fail.

So when we write:

  {ok, S} = file:open(”



Categories: Blogs  Joe Armstrong