polygon_tile_mapper_unit_test
AUTO-GENERATED FILE – DO NOT EDIT MANUALLY
Unit tests for PolygonTileMapper static methods
Source File: /addons/grid_building/test/collision/detection/polygon_tile_mapper_unit_test.gd
Extends: GdUnitTestSuite
Constants
- Constant:
DEFAULT_TILE_SIZE = Vector2i(16, 16)- DRY Constants - reused 3+ times across test methods - Constant:
DEFAULT_TEST_POSITION = Vector2(320, 320) - Constant:
TEST_MAP_SIZE = 40
Public Methods
create_test_tile_map
| |
DRY Helper: Create a properly configured TileMapLayer for testing
create_static_body
| |
DRY Helper: Create a StaticBody2D with proper collision hierarchy setup
create_collision_polygon
| |
DRY Helper: Create a CollisionPolygon2D with points and add to parent
test_process_polygon_with_diagnostics
| |
DRY: Covered by parameterized shape/tile tests above Test diagnostic processing functionality
test_compute_tile_offsets_null_polygon
| |
Test null polygon handling
test_compute_tile_offsets_null_map
| |
Test null map handling
test_compute_tile_offsets_no_tile_set
| |
Test map without tile set
test_compute_tile_offsets_at_origin
| |
Test polygon at origin
test_compute_tile_offsets_large_polygon
| |
Test large polygon covering many tiles
test_compute_tile_offsets_with_parent
| |
Test polygon with parent transform
test_process_polygon_with_diagnostics_convex
| |
Test diagnostic information for convex polygon
test_process_polygon_with_diagnostics_concave
| |
Test diagnostic information for concave polygon
test_compute_tile_offsets_different_tile_sizes
| |
Test polygon processing with different tile sizes
test_compute_tile_offsets_outside_bounds
| |
Test polygon completely outside tilemap bounds
test_compute_tile_offsets_complex_polygon
| |
Test polygon processing performance with complex polygon
test_tile_property_detection_diagnostics
| |
Test to diagnose tile property detection issue
test_compute_tile_offsets_consistency
| |
Test that results are consistent across multiple calls
test_filter_area_diagnostics
| |
Diagnostic: Per-offset area inspection to debug final filtering
test_polygon_tile_overlap_area_empty_polygon
| |
Unit tests for get_polygon_tile_overlap_area function Test empty polygon
test_polygon_tile_overlap_area_outside
| |
Test polygon completely outside rect
test_polygon_tile_overlap_area_completely_inside
| |
Test polygon completely inside rect
test_polygon_tile_overlap_area_exact_match
| |
Test polygon exactly matching rect bounds
test_polygon_tile_overlap_area_contains_rect
| |
Test polygon completely containing rect
test_polygon_tile_overlap_area_partial_overlap
| |
Test partial overlap
test_polygon_tile_overlap_area_triangle
| |
Test triangle overlap
test_polygon_tile_overlap_area_complex
| |
Test complex polygon
test_concave_polygon_tile_distribution
| |
Test concave polygon tile distribution - isolates issue from integration test
Private Methods
_create_collision_polygon
| |
Flags: private
Grid Building v5.0.8 | Generated 24/05/2026