Browse Source

QA: side-step wxSize printer not working for some

Not sure what it is that caused it to break (reported by
Seth on Linux, but works for me and on the CI).

Rather than trying to be clever at this point, just do the dumb
thing (and remove the boost_test_print_type for wxSize to prevent
someone using it for the time being).
pcb_db
John Beard 9 months ago
parent
commit
30affcd7a1
  1. 2
      qa/qa_utils/include/qa_utils/wx_utils/unit_test_utils.h
  2. 7
      qa/qa_utils/wx_utils/unit_test_utils.cpp
  3. 5
      qa/tests/common/wximage_test_utils.cpp

2
qa/qa_utils/include/qa_utils/wx_utils/unit_test_utils.h

@ -142,8 +142,6 @@ std::ostream& boost_test_print_type( std::ostream& os, std::pair<K, V> const& aP
*/
std::ostream& boost_test_print_type( std::ostream& os, wxPoint const& aVec );
std::ostream& boost_test_print_type( std::ostream& os, wxSize const& aSize );
namespace KI_TEST
{

7
qa/qa_utils/wx_utils/unit_test_utils.cpp

@ -31,13 +31,6 @@ std::ostream& boost_test_print_type( std::ostream& os, wxPoint const& aPt )
}
std::ostream& boost_test_print_type( std::ostream& os, wxSize const& aSize )
{
os << "wxSize[ x=\"" << aSize.x << "\" y=\"" << aSize.y << "\" ]";
return os;
}
std::string KI_TEST::GetEeschemaTestDataDir()
{
const char* env = std::getenv( "KICAD_TEST_EESCHEMA_DATA_DIR" );

5
qa/tests/common/wximage_test_utils.cpp

@ -61,7 +61,10 @@ bool ImagesHaveSamePixels( const wxImage& aImgA, const wxImage& aImgB )
{
if( aImgA.GetSize() != aImgB.GetSize() )
{
BOOST_TEST_INFO( "Image sizes differ: " << aImgA.GetSize() << " vs " << aImgB.GetSize() );
BOOST_TEST_INFO( "Image sizes differ: " << aImgA.GetSize().GetWidth() << "x"
<< aImgA.GetSize().GetHeight() << " vs "
<< aImgB.GetSize().GetWidth() << "x"
<< aImgB.GetSize().GetHeight() );
return false;
}

Loading…
Cancel
Save