QA test, prettifier: Update golden files to the latest version.

Add also a warning when a golden file is too old and creates comparison error.
This commit is contained in:
jean-pierre charras 2023-12-16 10:49:12 +01:00
parent c16db03321
commit 8e647c24b4
3 changed files with 10 additions and 3 deletions

View File

@ -1,5 +1,5 @@
(footprint "Reverb_BTDR-1V"
(version 20231014)
(version 20231212)
(generator "pcbnew")
(generator_version "7.99")
(layer "F.Cu")

View File

@ -1,5 +1,5 @@
(footprint "Samtec_HLE-133-02-xx-DV-PE-LC_2x33_P2.54mm_Horizontal"
(version 20231014)
(version 20231212)
(generator "pcbnew")
(generator_version "7.99")
(layer "F.Cu")

View File

@ -45,7 +45,7 @@ struct PRETTIFIER_TEST_FIXTURE
SETTINGS_MANAGER m_settingsManager;
};
#include <wx/log.h>
BOOST_FIXTURE_TEST_CASE( FootprintPrettifier, PRETTIFIER_TEST_FIXTURE )
{
std::vector<wxString> footprints = {
@ -83,6 +83,13 @@ 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 );