Do not rely on string conversion of anonymous namespace
@qukhan Thanks for the review. I have updated as requested.
The conversion to a string of the name of an anonymous namespace can differ between compilers so do not rely on it. Instead give the namespace a name that can then be used in strings to check the desired functionality in the test.