rect4x2_bounds_validation_unit_test

AUTO-GENERATED FILE – DO NOT EDIT MANUALLY

Unit tests isolating pre-validation bounds for RECT_4X2 Purpose: Reproduce “Tried placing outside of valid map area” seen in integration Strategy: Use IndicatorManager + PlacementValidator directly, compute safe tiles from used_rect, and assert pre-validation succeeds at start tile, with rich diagnostics.

Source File: /addons/grid_building/test/placement/unit/rect4x2_bounds_validation_unit_test.gd

Extends: GdUnitTestSuite

Properties

  • Property: runner: GdUnitSceneRunner
  • Property: env: [BuildingTestEnvironment](./building-test-environment/)

Private Properties

  • Property: _building_system: [BuildingSystem](./building-system/) (private)
  • Property: _container: [GBCompositionContainer](./gb-composition-container/) (private)
  • Property: _indicator_manager: [IndicatorManager](./indicator-manager/) (private)
  • Property: _map: TileMapLayer (private)
  • Property: _targeting_state: [GridTargetingState](./grid-targeting-state/) (private)
  • Property: _positioner: Node2D (private)
  • Property: _isolation_state: TestIsolation.BuildingTestIsolationState (private)

Constants

  • Constant: SAFE_START_TILE := GBTestConstants.DEFAULT_CENTER_TILE
  • Constant: OUTSIDE_OFFSET := 2
  • Constant: PLACEABLE_RECT_4X2 := GBTestConstants.PLACEABLE_RECT_4X2
  • Constant: TestIsolation = preload("res://test/helpers/gb_test_isolation.gd")

Public Methods

before

1
before() -> void

before_test

1
before_test() -> void

after

1
after() -> void

after_test

1
after_test() -> void

move_positioner_to_tile

1
move_positioner_to_tile(target_tile: Vector2i) -> void

enter_build_mode_for_placeable

1
enter_build_mode_for_placeable(placeable: Placeable) -> PlacementReport

validate_placement

1
validate_placement() -> ValidationResults

get_indicator_tile_positions_as_strings

1
get_indicator_tile_positions_as_strings() -> Array[String]

assert_validation_success

1
2
3
4
assert_validation_success(
    result: ValidationResults,
    context_message: String
) -> void

test_pre_validation_is_successful_for_rect4x2_start_tile

1
test_pre_validation_is_successful_for_rect4x2_start_tile() -> void

test_bounds_tiles_have_tiledata

1
test_bounds_tiles_have_tiledata() -> void

test_pre_validation_out_of_bounds_outside_used_rect

1
test_pre_validation_out_of_bounds_outside_used_rect() -> void


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