environment_loading_unit_test

AUTO-GENERATED FILE – DO NOT EDIT MANUALLY

Source File: /addons/grid_building/test/utilities/data/environment_loading_unit_test.gd

Extends: GdUnitTestSuite

Properties

  • Property: test_types := [

    Unit test for environment loading functionality Tests GBTestConstants environment scene loading in isolation and ensures all environments use the same test composition container

    TILEMAP DIMENSION VALIDATION: All test environment scenes must have 31x31 tile maps from (-15, -15) to (15, 15). This provides:

    • Consistent test boundary expectations across all environments
    • Safe placement zones for collision and bounds testing
    • Prevents “Tried placing outside of valid map area” errors
    • Ensures indicator generation has sufficient space for all test objects
    • Provides predictable coordinate ranges for parameterized tests

    WHY 31x31 FROM -15 TO +15 (ACTUAL DIMENSIONS):

    • Centered at origin (0, 0) for intuitive positioning
    • 31x31 provides sufficient space for complex multi-tile objects
    • Historical implementation uses (-15, -15) to (15, 15) inclusive
    • ISOMETRIC_TEST uses different dimensions due to isometric tile requirements
    • Provides margins for drag-building tests and collision separation
  • Property: standard_tilemap_test_types := [

Public Methods

test_environment_scene_loading

1
2
3
4
test_environment_scene_loading(
    p_test_environment_type: GBTestConstants.EnvironmentType,
    test_parameters := test_types
) -> void

test_environment_scene_instantiation

1
2
3
4
test_environment_scene_instantiation(
    p_test_environment_type: GBTestConstants.EnvironmentType,
    test_parameters := test_types
) -> void

test_environment_uses_same_test_container

1
2
3
4
test_environment_uses_same_test_container(
    p_test_environment_type: GBTestConstants.EnvironmentType,
    test_parameters := test_types
) -> void

test_environment_tilemaps_have_correct_dimensions

1
2
3
4
test_environment_tilemaps_have_correct_dimensions(
    p_test_environment_type: GBTestConstants.EnvironmentType,
    test_parameters := standard_tilemap_test_types
) -> void

Test: Environment tilemaps are correctly dimensioned (31x31 from -15 to +15) This ensures consistent test environments and prevents bounds validation issues



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