test_prettifier: Better warning message for commit 8e647c24

This commit is contained in:
jean-pierre charras 2023-12-16 13:30:06 +01:00
parent 8849891893
commit d8b1e3fcb3
1 changed files with 10 additions and 7 deletions

View File

@ -83,13 +83,6 @@ BOOST_FIXTURE_TEST_CASE( FootprintPrettifier, PRETTIFIER_TEST_FIXTURE )
// Hack around the fact that PAD::operator== compares footprint UUIDs, even though
// these UUIDs cannot be preserved through a round-trip
const_cast<KIID&>( converted->m_Uuid ) = original->m_Uuid;
// Note also m_fileFormatVersionAtLoad could create an issue
// So warn the user if happens
if( converted->GetFileFormatVersionAtLoad() != original->GetFileFormatVersionAtLoad() )
{
wxLogWarning( "Golden file has a old version id %d and need update (now %d)",
original->GetFileFormatVersionAtLoad(),converted->GetFileFormatVersionAtLoad() );
}
// File should parse the same way
BOOST_REQUIRE( *original == *converted );
@ -99,6 +92,16 @@ BOOST_FIXTURE_TEST_CASE( FootprintPrettifier, PRETTIFIER_TEST_FIXTURE )
KI_TEST::GetPcbnewTestDataDir(),
footprint.ToStdString() );
{
// Note also m_fileFormatVersionAtLoad could create an issue
// So warn the user if happens
if( converted->GetFileFormatVersionAtLoad() != original->GetFileFormatVersionAtLoad() )
{
wxLogWarning( "Golden file %s has a old version id %d and need update (now %d)",
goldenPath.c_str(),
original->GetFileFormatVersionAtLoad(),converted->GetFileFormatVersionAtLoad() );
}
std::ifstream test( newPath );
std::ifstream golden( goldenPath );