Update test.cpp

add code