You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[libc] Fix multiply-defined global functions in ctype tests (#119055)
For whatever reason, each ctype test contains its own copy of
some identical helper source code. These local helpers were
defined with external linkage for no apparent reason. This leads
to multiple definition errors when linking these tests together.
This change moves each file's local helper code into an anonymous
namespace so it has internal linkage. It's notable that the libc
test code does not follow the most common norm of gtest-style
code where all the `TEST(...)` cases themselves are defined
inside an anonymous namespace (along with whatever other local
helpers they use); whether libc's tests should follow that usual
convention can be addressed holistically in future discussion.
The replacement of numerous cut&paste'd copies of identical
helper code with sharing the source code in some usual fashion is
also left for later cleanup.
This change only makes the test code not straightforwardly have
multiple definition errors that prevent linking a test executable
at all.
0 commit comments