C++ test code