Tidied up test script for C++ namespaces.