Improve test.cpp