Replace anonymous namespace with a named one in the test helpers.
This should avoid clang warnings about the function in anonymous namespace being unused. This is the backport of r76928 from master.
This commit is contained in:
@@ -14,7 +14,7 @@
|
|||||||
|
|
||||||
#include "asserthelper.h"
|
#include "asserthelper.h"
|
||||||
|
|
||||||
namespace
|
namespace wxTestPrivate
|
||||||
{
|
{
|
||||||
std::ostream& operator<<(std::ostream& os, const ColourChannel& cc)
|
std::ostream& operator<<(std::ostream& os, const ColourChannel& cc)
|
||||||
{
|
{
|
||||||
@@ -23,10 +23,12 @@ namespace
|
|||||||
os << static_cast<int>(cc.m_value);
|
os << static_cast<int>(cc.m_value);
|
||||||
return os;
|
return os;
|
||||||
}
|
}
|
||||||
} // anonymous namespace
|
}
|
||||||
|
|
||||||
std::ostream& operator<<(std::ostream& os, const wxColour& c)
|
std::ostream& operator<<(std::ostream& os, const wxColour& c)
|
||||||
{
|
{
|
||||||
|
using wxTestPrivate::ColourChannel;
|
||||||
|
|
||||||
os << std::hex << std::noshowbase
|
os << std::hex << std::noshowbase
|
||||||
<< "("
|
<< "("
|
||||||
<< ColourChannel(c.Red()) << ", "
|
<< ColourChannel(c.Red()) << ", "
|
||||||
|
@@ -14,7 +14,7 @@
|
|||||||
#include "wx/gdicmn.h"
|
#include "wx/gdicmn.h"
|
||||||
#include "wx/font.h"
|
#include "wx/font.h"
|
||||||
|
|
||||||
namespace
|
namespace wxTestPrivate
|
||||||
{
|
{
|
||||||
// by default colour components values are output incorrectly because they
|
// by default colour components values are output incorrectly because they
|
||||||
// are unsigned chars, define a small helper struct which formats them in
|
// are unsigned chars, define a small helper struct which formats them in
|
||||||
@@ -27,8 +27,7 @@ namespace
|
|||||||
};
|
};
|
||||||
|
|
||||||
std::ostream& operator<<(std::ostream& os, const ColourChannel& cc);
|
std::ostream& operator<<(std::ostream& os, const ColourChannel& cc);
|
||||||
|
} // wxTestPrivate namespace
|
||||||
} // anonymous namespace
|
|
||||||
|
|
||||||
// this operator is needed to use CPPUNIT_ASSERT_EQUAL with wxColour objects
|
// this operator is needed to use CPPUNIT_ASSERT_EQUAL with wxColour objects
|
||||||
std::ostream& operator<<(std::ostream& os, const wxColour& c);
|
std::ostream& operator<<(std::ostream& os, const wxColour& c);
|
||||||
|
Reference in New Issue
Block a user