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

Test suite for meander corner radius constraints (issue #8629). More...

#include <qa_utils/wx_utils/unit_test_utils.h>
#include <boost/test/unit_test.hpp>
#include <router/pns_meander.h>

Go to the source code of this file.

Functions

 BOOST_AUTO_TEST_CASE (DefaultSettings)
 Test that MEANDER_SETTINGS has correct defaults for corner style.
 
 BOOST_AUTO_TEST_CASE (MinCornerRadiusThreshold)
 Test minimum corner radius threshold relative to track width.
 
 BOOST_AUTO_TEST_CASE (GeometricConstraints)
 Test that corner radius requirements are geometrically consistent.
 

Detailed Description

Test suite for meander corner radius constraints (issue #8629).

This verifies that meanders maintain visibly rounded corners and do not degenerate to nearly-square shapes when space is constrained.

Definition in file test_meander_corner_radius.cpp.

Function Documentation

◆ BOOST_AUTO_TEST_CASE() [1/3]

BOOST_AUTO_TEST_CASE ( DefaultSettings )

◆ BOOST_AUTO_TEST_CASE() [2/3]

BOOST_AUTO_TEST_CASE ( GeometricConstraints )

Test that corner radius requirements are geometrically consistent.

For a meander with round corners, the corner radius is limited by:

  1. Half the amplitude (to fit the U-turn)
  2. Half the spacing (to fit between adjacent segments)

If the minimum corner radius (width/2) exceeds these limits, the meander configuration should be rejected.

Definition at line 97 of file test_meander_corner_radius.cpp.

References BOOST_CHECK_EQUAL(), and BOOST_TEST_MESSAGE().

◆ BOOST_AUTO_TEST_CASE() [3/3]

BOOST_AUTO_TEST_CASE ( MinCornerRadiusThreshold )

Test minimum corner radius threshold relative to track width.

For issue #8629, the fix ensures that meanders with corner radii less than half the track width are rejected. This test verifies the relationship between track width and acceptable corner radius.

Definition at line 66 of file test_meander_corner_radius.cpp.

References BOOST_TEST_MESSAGE().