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

Go to the source code of this file.

Classes

struct  CollisionFixture
 Fixture for the Collision test suite. More...
 

Functions

 BOOST_AUTO_TEST_CASE (HasHoles)
 Declares the CollisionFixture as the boost test suite fixture.
 
 BOOST_AUTO_TEST_CASE (PointOnEdge)
 This test checks basic behaviour of PointOnEdge, testing if points on corners, outline edges and hole edges are detected as colliding.
 
 BOOST_AUTO_TEST_CASE (pointInPolygonSet)
 This test checks that the function Contains, whose behaviour has been updated to also manage holey polygons, does the right work.
 
 BOOST_AUTO_TEST_CASE (Collide)
 This test checks the behaviour of the Collide (with a point) method.
 
 BOOST_AUTO_TEST_CASE (CollideVertex)
 This test checks the behaviour of the CollideVertex method, testing whether the collision with vertices is well detected.
 
 BOOST_AUTO_TEST_CASE (CollideVertexWithClearance)
 This test checks the behaviour of the CollideVertex method, testing whether the collision with vertices is well detected.
 
 BOOST_AUTO_TEST_CASE (CollideSegments)
 Check that SHAPE_POLY_SET::Collide does the right thing for segments.
 

Function Documentation

◆ BOOST_AUTO_TEST_CASE() [1/7]

BOOST_AUTO_TEST_CASE ( Collide  )

This test checks the behaviour of the Collide (with a point) method.

Definition at line 178 of file test_shape_poly_set_collision.cpp.

◆ BOOST_AUTO_TEST_CASE() [2/7]

BOOST_AUTO_TEST_CASE ( CollideSegments  )

Check that SHAPE_POLY_SET::Collide does the right thing for segments.

Definition at line 241 of file test_shape_poly_set_collision.cpp.

◆ BOOST_AUTO_TEST_CASE() [3/7]

BOOST_AUTO_TEST_CASE ( CollideVertex  )

This test checks the behaviour of the CollideVertex method, testing whether the collision with vertices is well detected.

Definition at line 215 of file test_shape_poly_set_collision.cpp.

References VECTOR2< T >::x, and VECTOR2< T >::y.

◆ BOOST_AUTO_TEST_CASE() [4/7]

BOOST_AUTO_TEST_CASE ( CollideVertexWithClearance  )

This test checks the behaviour of the CollideVertex method, testing whether the collision with vertices is well detected.

Definition at line 230 of file test_shape_poly_set_collision.cpp.

◆ BOOST_AUTO_TEST_CASE() [5/7]

BOOST_AUTO_TEST_CASE ( HasHoles  )

Declares the CollisionFixture as the boost test suite fixture.

Simple dummy test to check that HasHoles() definition is right

Definition at line 117 of file test_shape_poly_set_collision.cpp.

◆ BOOST_AUTO_TEST_CASE() [6/7]

BOOST_AUTO_TEST_CASE ( pointInPolygonSet  )

This test checks that the function Contains, whose behaviour has been updated to also manage holey polygons, does the right work.

Definition at line 152 of file test_shape_poly_set_collision.cpp.

◆ BOOST_AUTO_TEST_CASE() [7/7]

BOOST_AUTO_TEST_CASE ( PointOnEdge  )

This test checks basic behaviour of PointOnEdge, testing if points on corners, outline edges and hole edges are detected as colliding.

Definition at line 127 of file test_shape_poly_set_collision.cpp.