From 532645c9b0f80c5fc614828970145b11d8a97642 Mon Sep 17 00:00:00 2001 From: Jeff Young Date: Sun, 25 Feb 2024 21:08:23 +0000 Subject: [PATCH] Add tables to eeItem test. --- qa/tests/eeschema/test_ee_item.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/qa/tests/eeschema/test_ee_item.cpp b/qa/tests/eeschema/test_ee_item.cpp index dc7567c816..053a949832 100644 --- a/qa/tests/eeschema/test_ee_item.cpp +++ b/qa/tests/eeschema/test_ee_item.cpp @@ -38,6 +38,8 @@ #include #include #include +#include +#include #include #include #include @@ -88,6 +90,18 @@ public: case SCH_BITMAP_T: return new SCH_BITMAP(); case SCH_TEXT_T: return new SCH_TEXT( VECTOR2I( 0, 0 ), "test text" ); case SCH_TEXTBOX_T: return new SCH_TEXTBOX( 0, FILL_T::NO_FILL, "test textbox" ); + case SCH_TABLECELL_T: return new SCH_TABLECELL(); + case SCH_TABLE_T: + { + SCH_TABLE* table = new SCH_TABLE( schIUScale.mmToIU( 0.1 ) ); + + table->SetColCount( 2 ); + + for( int ii = 0; ii < 4; ++ii ) + table->InsertCell( ii, new SCH_TABLECELL() ); + + return table; + } case SCH_LABEL_T: return new SCH_LABEL( VECTOR2I( 0, 0 ), "test label" ); case SCH_DIRECTIVE_LABEL_T: return new SCH_DIRECTIVE_LABEL( VECTOR2I( 0, 0 ) ); case SCH_GLOBAL_LABEL_T: return new SCH_GLOBALLABEL();