test_prettifier: Better warning message for commit 8e647c24
This commit is contained in:
parent
8849891893
commit
d8b1e3fcb3
|
@ -83,13 +83,6 @@ BOOST_FIXTURE_TEST_CASE( FootprintPrettifier, PRETTIFIER_TEST_FIXTURE )
|
||||||
// Hack around the fact that PAD::operator== compares footprint UUIDs, even though
|
// Hack around the fact that PAD::operator== compares footprint UUIDs, even though
|
||||||
// these UUIDs cannot be preserved through a round-trip
|
// these UUIDs cannot be preserved through a round-trip
|
||||||
const_cast<KIID&>( converted->m_Uuid ) = original->m_Uuid;
|
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
|
// File should parse the same way
|
||||||
BOOST_REQUIRE( *original == *converted );
|
BOOST_REQUIRE( *original == *converted );
|
||||||
|
@ -99,6 +92,16 @@ BOOST_FIXTURE_TEST_CASE( FootprintPrettifier, PRETTIFIER_TEST_FIXTURE )
|
||||||
KI_TEST::GetPcbnewTestDataDir(),
|
KI_TEST::GetPcbnewTestDataDir(),
|
||||||
footprint.ToStdString() );
|
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 test( newPath );
|
||||||
std::ifstream golden( goldenPath );
|
std::ifstream golden( goldenPath );
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue