KiCad PCB EDA Suite
Loading...
Searching...
No Matches
test_sch_rule_area_directive_visibility.cpp File Reference

Regression test for issue 23597. More...

Go to the source code of this file.

Functions

static void attachDirective (SCH_RULE_AREA &aRuleArea, SCH_DIRECTIVE_LABEL &aDirective)
 Attach a directive label to a rule area, establishing the bidirectional cache link that addDirective() builds at runtime.
 
 BOOST_AUTO_TEST_CASE (AreaWithoutDirectiveIsNotDirectiveLabelOnly)
 
 BOOST_AUTO_TEST_CASE (AreaWithDirectiveAndNoFlagsIsDirectiveLabelOnly)
 
 BOOST_AUTO_TEST_CASE (AnyDesignFlagDisqualifiesDirectiveLabelOnly)
 
 BOOST_AUTO_TEST_CASE (ClearingFlagsRestoresDirectiveLabelOnly)
 

Detailed Description

Regression test for issue 23597.

When "Show Directive Labels" is off, a rule area that exists only to carry directive labels must follow the labels and become both invisible and unselectable. A rule area which also applies DNP or one of the exclude-from flags has a design effect of its own and must stay visible, so it does not qualify as a directive-label-only area. SCH_RULE_AREA::IsDirectiveLabelOnlyArea() is the shared gate that both the painter and the selection tool consult, so the visibility contract is exercised through it.

Definition in file test_sch_rule_area_directive_visibility.cpp.

Function Documentation

◆ attachDirective()

static void attachDirective ( SCH_RULE_AREA & aRuleArea,
SCH_DIRECTIVE_LABEL & aDirective )
static

Attach a directive label to a rule area, establishing the bidirectional cache link that addDirective() builds at runtime.

Linking both directions keeps ~SCH_RULE_AREA safe regardless of the order in which the fixtures are torn down.

Definition at line 44 of file test_sch_rule_area_directive_visibility.cpp.

References attachDirective().

Referenced by attachDirective(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), and BOOST_AUTO_TEST_CASE().

◆ BOOST_AUTO_TEST_CASE() [1/4]

◆ BOOST_AUTO_TEST_CASE() [2/4]

BOOST_AUTO_TEST_CASE ( AreaWithDirectiveAndNoFlagsIsDirectiveLabelOnly )

◆ BOOST_AUTO_TEST_CASE() [3/4]

BOOST_AUTO_TEST_CASE ( AreaWithoutDirectiveIsNotDirectiveLabelOnly )

◆ BOOST_AUTO_TEST_CASE() [4/4]

BOOST_AUTO_TEST_CASE ( ClearingFlagsRestoresDirectiveLabelOnly )