Adding missing main.cpp of unit test and correcting minor syntax problem