|
KiCad PCB EDA Suite
|
Test suite for SCH_SHEET_PATH and SCH_SHEET_LIST. More...
#include <qa_utils/uuid_test_utils.h>#include <qa_utils/wx_utils/unit_test_utils.h>#include "eeschema_test_utils.h"#include <sch_sheet_path.h>#include <wildcards_and_files_ext.h>#include <eeschema_helpers.h>#include <sch_screen.h>#include <sch_sheet.h>#include <schematic.h>#include <atomic>#include <sstream>#include <thread>Go to the source code of this file.
Classes | |
| class | TEST_SCH_SHEET_PATH_FIXTURE |
Functions | |
| BOOST_AUTO_TEST_CASE (Empty) | |
| Declare the test suite. | |
| BOOST_AUTO_TEST_CASE (NonEmpty) | |
| Check properties of a non-empty SCH_SHEET_PATH. | |
| BOOST_AUTO_TEST_CASE (Compare) | |
| BOOST_AUTO_TEST_CASE (SheetListGetOrdinalPath) | |
| BOOST_AUTO_TEST_CASE (SheetPathPageProperties) | |
| Test sheet path page number properties. | |
| BOOST_AUTO_TEST_CASE (PathHumanReadableWithSlashes) | |
| Test PathHumanReadable with sheet names containing slashes. | |
| BOOST_AUTO_TEST_CASE (PathFollowsSheetListChanges) | |
| Check that Path() answers from the current sheet list rather than from stale state. | |
| BOOST_AUTO_TEST_CASE (PathIsSafeOnSharedPaths) | |
| The parallel connectivity workers all resolve names against sheet paths they share, so Path() has to stay correct when several threads reach the same path at once. | |
Test suite for SCH_SHEET_PATH and SCH_SHEET_LIST.
Definition in file test_sch_sheet_path.cpp.
| BOOST_AUTO_TEST_CASE | ( | Compare | ) |
Definition at line 127 of file test_sch_sheet_path.cpp.
| BOOST_AUTO_TEST_CASE | ( | Empty | ) |
Declare the test suite.
Check properties of an empty SCH_SHEET_PATH
Definition at line 86 of file test_sch_sheet_path.cpp.
References BOOST_AUTO_TEST_CASE(), and BOOST_CHECK_EQUAL().
| BOOST_AUTO_TEST_CASE | ( | NonEmpty | ) |
Check properties of a non-empty SCH_SHEET_PATH.
Definition at line 107 of file test_sch_sheet_path.cpp.
References BOOST_CHECK_EQUAL(), BOOST_CHECK_PREDICATE(), and KI_TEST::IsUUIDPathWithLevels().
| BOOST_AUTO_TEST_CASE | ( | PathFollowsSheetListChanges | ) |
Check that Path() answers from the current sheet list rather than from stale state.
Definition at line 229 of file test_sch_sheet_path.cpp.
References BOOST_CHECK_EQUAL().
| BOOST_AUTO_TEST_CASE | ( | PathHumanReadableWithSlashes | ) |
Test PathHumanReadable with sheet names containing slashes.
This tests the fix for GitLab issue #21878 where slashes in sheet names caused incorrect netclass pattern matching.
Definition at line 189 of file test_sch_sheet_path.cpp.
References BOOST_CHECK_EQUAL(), SCH_SHEET_PATH::PathHumanReadable(), SCH_SHEET_PATH::push_back(), and SHEET_NAME.
| BOOST_AUTO_TEST_CASE | ( | PathIsSafeOnSharedPaths | ) |
The parallel connectivity workers all resolve names against sheet paths they share, so Path() has to stay correct when several threads reach the same path at once.
It used to fill a lazy member cache, and concurrent fills reallocated that buffer under each other.
Definition at line 253 of file test_sch_sheet_path.cpp.
References BOOST_CHECK_EQUAL(), expected, and path.
| BOOST_AUTO_TEST_CASE | ( | SheetListGetOrdinalPath | ) |
Definition at line 137 of file test_sch_sheet_path.cpp.
References BOOST_CHECK_EQUAL(), BOOST_REQUIRE(), KI_TEST::GetEeschemaTestDataDir(), SCH_SHEET_LIST::GetOrdinalPath(), SCH_SHEET::GetScreen(), FILEEXT::KiCadSchematicFileExtension, and EESCHEMA_HELPERS::LoadSchematic().
| BOOST_AUTO_TEST_CASE | ( | SheetPathPageProperties | ) |
Test sheet path page number properties.
Definition at line 171 of file test_sch_sheet_path.cpp.