shape_collision_validation_tests

AUTO-GENERATED FILE – DO NOT EDIT MANUALLY

Source File: /addons/grid_building/test/collision/detection/shape_collision_validation_tests.gd

Extends: GdUnitTestSuite

Properties

  • Property: test_container: [GBCompositionContainer](./gb-composition-container/)

Constants

  • Constant: TILE_SIZE: Vector2 = Vector2(16, 16)

    Comprehensive parameterized test suite for collision detection Consolidates functionality from multiple debug tests into a single, maintainable test file Constants for test configuration

  • Constant: BOUNDS_TOLERANCE: float = 1.0

  • Constant: OVERLAP_EPSILON_RATIO: float = 0.05

  • Constant: PERFORMANCE_TIMEOUT_MS: int = 100

Public Methods

assert_bounds_equal

1
2
3
4
5
6
assert_bounds_equal(
    actual: Rect2,
    expected: Rect2,
    case_name: String,
    tolerance: float = BOUNDS_TOLERANCE
) -> void

Helper functions for test maintainability Asserts that two Rect2 bounds are approximately equal within tolerance


calculate_tile_coverage

1
2
3
4
calculate_tile_coverage(
    bounds: Rect2,
    tile_size: Vector2 = TILE_SIZE
) -> Vector2i

Calculates tile coverage for given bounds


assert_tile_coverage

1
2
3
4
5
6
assert_tile_coverage(
    bounds: Rect2,
    expected_tiles: Vector2i,
    case_name: String,
    tile_size: Vector2 = TILE_SIZE
) -> void

Asserts tile coverage matches expected values


generate_test_positions

1
2
3
4
generate_test_positions(
    grid_size: int = 21,
    tile_size: Vector2 = TILE_SIZE
) -> Array[Vector2]

Generates a grid of test positions for performance testing


before_test

1
before_test() -> void

test_collision_detection_performance

1
test_collision_detection_performance() -> void

Test performance of collision detection methods



Grid Building v5.0.8 | Generated 24/05/2026