add test.cpp by ollyblue