From http://www.ibm.com/developerworks/cn/linux/l-cn-cppunittest/