Folded the C test code together with the C++ stuff.