3
Namespaces anônimos tornam o código não testável
Aqui está um código C ++ típico: foo.hpp #pragma once class Foo { public: void f(); void g(); ... }; foo.cpp #include "foo.hpp" namespace { const int kUpperX = 111; const int kAlternativeX = 222; bool match(int x) { return x < kUpperX || x == kAlternativeX; } } // …
13
c++
unit-testing