Showing posts with label unit test frameworks. Show all posts
Showing posts with label unit test frameworks. Show all posts

22 June 2009

D Programming Language

The D Programming Language developed by Walter Bright may really pick up steam when Andrei Alexandrescu's book The D Programming Language comes out (like I know anything programming languages.) See Safari Rough Cuts for the first few chapters.

So why am I posting about D? Because Andrei's book showed up on Safari Rough Cuts which my coworker/friend Steve Nolen follows. Of course Andrei is one of Steve's heroes and D is very similar to C++. There is no telling where this all might go or end now that it is on Steve's radar. But it is not like I did not tell him about it about a year ago. ;)

Actually D looks really interesting. There are several compilers out there including a GNU D compiler package. It seems there are two Eclipse plug-ins for D ..... Descent and Mmrnmhrm. Also D can interact with C++ through the C API and possibly a more complete C++ API in the near future. There is also a document generator. For more about this see D Programming Language at Wikipedia.

D has unit testing capability built in and also Design by Contract capability. For more on the unit testing then see Unit Testing in D and Agile low level programming in D. It appears at first glance that the unit testing is meant to be part of the source code but it might be used in the way of xUnit and Kent Beck. I hope so.

Note D has been influenced by many successful concepts from other languages like JavaScript, PERL, Ruby, Lisp, Ada, Erlang, and Python.

With Andrei Alexandrescu champing D (The Case for D by Andrei Alexandrescu) then it could have a Bright future. Pun intended. ;)

Also see:
Interview with Walter Bright
Tango: The Developer's Library for D

I wonder if we can get a boost-like MPI interface to D? :)

20 June 2009

Unit Test Framework: UnitTest++

There are numerous unit test frameworks for C++ out there. The software effort that I am on uses one called UnitTest++ (aka UT++). It was designed and developed by games developers and it is open source.

The debut release post at Games From Within describes why another unit test framework, the design reasons, and its strengths & uniqueness.

UT++ practices what it preaches by being developed using test driven development (TDD) and comes with a suite of unit tests that runs automatically upon completion of the build. Not only do these tests give you confidence UT++ is installed correctly they also come in handy as developer documentation and even user examples & documentation. They are very nice examples of how one can use the framework.

UT++ is simple, lightweight, and easy to learn. If you have not used a unit test framework before then I can recommend UT++ as a place to start learning.