How to use google test with free functions in anonymous namespaces?
c++, c++11, function, googletest, namespaces
Solution
Google suggests including the .cpp file in the test. I think it's a small price to pay to keep my source code clean.
Problem
I have a class that does a number of things. In order to split work into logical units, I've created a number of free functions in the anonymous namespace, as they're only used in this class. I'm currently using gtest to unit test my classes. How can I implement unit tests for my anon namespace free functions?