Added some more test code in C++.