KiCad PCB EDA Suite
test_title_block.cpp File Reference

Go to the source code of this file.

Classes

struct  TitleBlockFixture
 

Functions

 BOOST_AUTO_TEST_CASE (SimpleAccess)
 Declares a struct as the Boost test fixture. More...
 
 BOOST_AUTO_TEST_CASE (Copy)
 

Function Documentation

◆ BOOST_AUTO_TEST_CASE() [1/2]

BOOST_AUTO_TEST_CASE ( SimpleAccess  )

Declares a struct as the Boost test fixture.

Check basic setting and getting of values

Definition at line 59 of file test_title_block.cpp.

60 {
61  BOOST_CHECK_EQUAL( "title", m_tb.GetTitle() );
62  BOOST_CHECK_EQUAL( "date", m_tb.GetDate() );
63  BOOST_CHECK_EQUAL( "company", m_tb.GetCompany() );
64 
65  // This one is blank
66  BOOST_CHECK_EQUAL( "", m_tb.GetRevision() );
67 
68  BOOST_CHECK_EQUAL( "comment1", m_tb.GetComment( 0 ) );
69  BOOST_CHECK_EQUAL( "comment2", m_tb.GetComment( 1 ) );
70  BOOST_CHECK_EQUAL( "comment3", m_tb.GetComment( 2 ) );
71  BOOST_CHECK_EQUAL( "comment4", m_tb.GetComment( 3 ) );
72 }

◆ BOOST_AUTO_TEST_CASE() [2/2]

BOOST_AUTO_TEST_CASE ( Copy  )

Definition at line 77 of file test_title_block.cpp.

78 {
79  TITLE_BLOCK tb_cpy = m_tb;
80 
81  // Check that values came through
82  BOOST_CHECK_EQUAL( "title", tb_cpy.GetTitle() );
83  BOOST_CHECK_EQUAL( "comment1", tb_cpy.GetComment( 0 ) );
84  BOOST_CHECK_EQUAL( "comment2", tb_cpy.GetComment( 1 ) );
85 }
const wxString & GetComment(int aIdx) const
Definition: title_block.h:107
Hold the information shown in the lower right corner of a plot, printout, or editing view.
Definition: title_block.h:40
const wxString & GetTitle() const
Definition: title_block.h:63

References TITLE_BLOCK::GetComment(), and TITLE_BLOCK::GetTitle().