GBTestConstants
AUTO-GENERATED FILE – DO NOT EDIT MANUALLY
Test Constants
Source File: /addons/grid_building/test/scenes/env/gb_test_constants.gd
Extends: RefCounted
Constants
Constant:
ALL_SYSTEMS_ENV_PATH: String = "res://addons/grid_building/test/scenes/env/all_systems_test_environment.tscn"These paths correspond to test environment scenes that provide pre-configured systems and components for various test scenarios. All Systems Test Environment - Complete grid building system setup
Constant:
BUILDING_TEST_ENV_PATH: String = "res://addons/grid_building/test/scenes/env/building_test_environment.tscn"- Building Test Environment - Focused on building system componentsConstant:
COLLISION_TEST_ENV_PATH: String = "res://addons/grid_building/test/scenes/env/collision_test_environment.tscn"- Collision Test Environment - Optimized for collision and placement testingConstant:
ISOMETRIC_TEST_ENV_PATH: String = "res://addons/grid_building/test/scenes/env/isometric_building_test_environment.tscn"- Isometric Test Environment - Optimized for isometric tile mapping and collision testingConstant:
COLLISIONS_CHECK_RULE : [CollisionsCheckRule](./collisions-check-rule/) = preload("res://addons/grid_building/test/resources/rules/test_collision_rule.tres")Constant:
SCENE_RECT_15_TILES: PackedScene = preload("res://addons/grid_building/test/scenes/objects/test_rect_15_tiles.tscn")Paths for test objects used in collision and placement testing Rectangular test object (15 tiles coverage)
Constant:
GIGANTIC_EGG_PATH: String = "res://addons/grid_building/test/scenes/objects/test_gigantic_egg.tscn"- Gigantic egg test object pathConstant:
PILLAR_PATH: String = "res://addons/grid_building/test/scenes/objects/test_pillar.tscn"- Test pillar object pathConstant:
ELLIPSE_PATH: String = "res://addons/grid_building/test/scenes/objects/test_elipse.tscn"- Ellipse test object pathConstant:
PLACEABLE_SMITHY: [Placeable](./placeable/) = preload("res://addons/grid_building/test/resources/placeable/test_smithy_placeable.tres")- Test smithy placeable (7x5 tiles - large)Constant:
PLACEABLE_TRAPEZOID : [Placeable](./placeable/) = preload("res://addons/grid_building/test/resources/placeable/test_trapezoid_placeable.tres")- Good placeable test for polygonConstant:
PLACEABLE_NO_COL_TEST_2D: [Placeable](./placeable/) = preload("res://addons/grid_building/test/resources/placeable/test_2d_placeable.tres")- Small 2D test placeable (single tile) - IMPORTANT: has no CollisionObject2D so will not collide with anything.Constant:
PLACEABLE_RECT_4X2: [Placeable](./placeable/) = preload("res://addons/grid_building/test/resources/placeable/test_placeable_rect_4x2.tres")- Small rectangular test placeable (4x2 tiles - 64x32 px)Constant:
RECT_15_TILES_PATH: String = "res://addons/grid_building/test/scenes/objects/test_rect_15_tiles.tscn"- Additional paths for test objectsConstant:
SMITHY_PATH: String = "res://addons/grid_building/test/scenes/objects/test_smithy.tscn"Constant:
PLACEABLE_INSTANCE_2D_PATH: String = "res://addons/grid_building/test/scenes/objects/test_placeable_instance_scene_2d.tscn"Constant:
TEST_2D_OBJECT_PATH: String = "res://addons/grid_building/test/scenes/objects/2d_test_object.tscn"Constant:
SKEW_ROTATION_RECT_PATH: String = "res://addons/grid_building/test/scenes/objects/test_skew_rotation_rect.tscn"Constant:
ISOMETRIC_BUILDING_PATH: String = "res://addons/grid_building/test/scenes/objects/isometric_building.tscn"Constant:
SCRIPT_KEEP_SCENE_PATH: String = "res://addons/grid_building/test/scenes/objects/script_keep_scene.tscn"Constant:
DEFAULT_TILE_SIZE: Vector2 = Vector2(16, 16)Common values used across multiple tests Default tile size for test environments
Constant:
DEFAULT_GRID_SIZE: Vector2i = Vector2i(20, 20)- Default test grid sizeConstant:
TEST_TIMEOUT_MS: int = 5000- Test timeout for async operations (milliseconds)Constant:
MAX_PERFORMANCE_INDICATORS: int = 1000- Maximum number of indicators to generate in performance testsConstant:
EXPECTED_31X31_TILE_COUNT: int = 31 * 31- Expected tile count for 31x31 buildable tile map (31 * 31 = 961)Constant:
TEST_COLLISION_LAYER: int = 1- Default collision layer for test objectsConstant:
TEST_COLLISION_MASK: int = 1- Default collision mask for test objectsConstant:
TEST_COMPOSITION_CONTAINER: [GBCompositionContainer](./gb-composition-container/) = preload("res://addons/grid_building/test/resources/composition_containers/test_composition_container.tres")- Test composition container for dependency injection - Used for Top Down and Sidescrolling games with square tilesConstant:
ISO_COMPOSITION_CONTAINER : [GBCompositionContainer](./gb-composition-container/) = preload("res://addons/grid_building/test/resources/composition_containers/test_iso_composition_container.tres")- Default isometric composition container for isometric-game specific testsConstant:
ORIGIN: Vector2 = Vector2.ZERO- Frequently used positions in test scenariosConstant:
CENTER: Vector2 = Vector2(160, 160) # 5x5 tiles at 32pxConstant:
TOP_LEFT: Vector2 = Vector2(32, 32)Constant:
TOP_RIGHT: Vector2 = Vector2(288, 32)Constant:
BOTTOM_LEFT: Vector2 = Vector2(32, 288)Constant:
BOTTOM_RIGHT: Vector2 = Vector2(288, 288)Constant:
OFF_GRID: Vector2 = Vector2(50, 50) # Not aligned to tile boundariesConstant:
DEFAULT_CENTER_TILE: Vector2i = Vector2i(0, 0)- Default center tile for positioner initialization - should be within map bounds for all test environments
Public Methods
validate_environment_scenes
| |
Flags: static
Static methods for validating test constants and scenes Validate that all environment scenes exist and can be loaded
get_environment_scene
| |
Flags: static
Get the environment scene by type
get_placeables
| |
Flags: static
Returns an array of test placeables for use as test parameters
validate_test_object_scene
| |
Flags: static
Check if a test object scene exists
assert_tile_map_sizes
| |
Flags: static
Assert that the tile map in the given environment has the expected number of tiles test_suite: The GdUnitTestSuite instance for making assertions environment: The test environment containing the tile map expected_width: Expected width of the tile grid expected_height: Expected height of the tile grid
Grid Building v5.0.8 | Generated 24/05/2026