main.cpp converted to a cxxtest