modify test.cpp for supportting gch