diff --git a/qa/eeschema/test_sch_sheet_path.cpp b/qa/eeschema/test_sch_sheet_path.cpp index 37c3b05aef..3970622435 100644 --- a/qa/eeschema/test_sch_sheet_path.cpp +++ b/qa/eeschema/test_sch_sheet_path.cpp @@ -112,9 +112,9 @@ BOOST_AUTO_TEST_CASE( NonEmpty ) BOOST_CHECK_EQUAL( m_linear.Last(), &m_sheets[2] ); BOOST_CHECK_EQUAL( m_linear.LastScreen(), nullptr ); - // don't know what the timestamps will be, but we know the format: /<8 chars>/<8 chars>/ + // don't know what the uuids will be, but we know the format: /<8-4-4-4-12>/<8-4-4-4-12>/ BOOST_CHECK_PREDICATE( - KI_TEST::IsTimestampStringWithLevels, ( m_linear.PathAsString().ToStdString() )( 2 ) ); + KI_TEST::IsUUIDPathWithLevels, ( m_linear.PathAsString().ToStdString() )( 2 ) ); // Sheet0 is the root sheet and isn't in the path BOOST_CHECK_EQUAL( m_linear.PathHumanReadable(), "/Sheet1/Sheet2/" ); diff --git a/qa/eeschema/timestamp_test_utils.cpp b/qa/eeschema/timestamp_test_utils.cpp index 05f16d7250..6f4f247a2f 100644 --- a/qa/eeschema/timestamp_test_utils.cpp +++ b/qa/eeschema/timestamp_test_utils.cpp @@ -39,9 +39,10 @@ bool EndsInTimestamp( const std::string& aStr ) return IsTimeStampish( aStr.end() - 8, aStr.end() ); } -bool IsTimestampStringWithLevels( const std::string& aStr, unsigned aLevels ) +bool IsUUIDPathWithLevels( const std::string& aStr, unsigned aLevels ) { - const unsigned tsLen = 8; + // A UUID is formated as 8-4-4-4-12 + const unsigned tsLen = 36; const unsigned levelLen = tsLen + 1; // add the / if( aStr.size() != aLevels * levelLen + 1 ) diff --git a/qa/eeschema/timestamp_test_utils.h b/qa/eeschema/timestamp_test_utils.h index 519e4fd723..4bca23963b 100644 --- a/qa/eeschema/timestamp_test_utils.h +++ b/qa/eeschema/timestamp_test_utils.h @@ -75,7 +75,7 @@ bool EndsInTimestamp( const std::string& aStr ); * @param levels expected levels * @return true if format matches */ -bool IsTimestampStringWithLevels( const std::string& aStr, unsigned aLevels ); +bool IsUUIDPathWithLevels( const std::string& aStr, unsigned aLevels ); } // namespace KI_TEST