diff --git a/unittests/scripts/a_component.gd b/unittests/scripts/a_component.gd index 3b9c171..23ad0c0 100644 --- a/unittests/scripts/a_component.gd +++ b/unittests/scripts/a_component.gd @@ -1,4 +1,4 @@ extends GFComponent -const CONST:= preload("res://components/b_module.gd") +const CONST:= preload("./b_module.gd") diff --git a/unittests/scripts/a_module.gd b/unittests/scripts/a_module.gd index 67e3cfa..fb0ecaf 100644 --- a/unittests/scripts/a_module.gd +++ b/unittests/scripts/a_module.gd @@ -1,8 +1,8 @@ extends GFModule -const DictionaryC:= preload("res://components/dictionary.gd") +const DictionaryC:= preload("./dictionary.gd") class SubEntity extends GFRegisterableEntity: pass -const b_module:= preload("res://components/b_module.gd") +const b_module:= preload("./b_module.gd") diff --git a/unittests/test_registration.gd b/unittests/test_registration.gd index 24bf1b1..2d4f540 100644 --- a/unittests/test_registration.gd +++ b/unittests/test_registration.gd @@ -2,6 +2,10 @@ @tool extends GutTest +const AModule = preload("./scripts/a_module.gd") +const AComponent = preload("./scripts/a_component.gd") +const AEntity = preload("./scripts/a_entity.gd") + var world:GFWorld func before_all(): @@ -14,7 +18,7 @@ func after_all(): func test_auto_register_script(): GFEntity.spawn(world) \ - .add_component(load("res://components/a_component.gd")) + .add_component(AComponent) assert_ne( world.lookup( @@ -24,7 +28,7 @@ func test_auto_register_script(): ) func test_register_script_module(): - world.register_script(load("res://components/a_module.gd")) + world.register_script(AModule) assert_ne( world.lookup( @@ -46,7 +50,7 @@ func test_register_script_module(): ) func test_register_script_component_script(): - world.register_script(load("res://components/a_component.gd")) + world.register_script(AComponent) assert_ne( world.lookup( @@ -56,7 +60,7 @@ func test_register_script_component_script(): ) func test_register_script_entity_script(): - world.register_script(load("res://components/a_entity.gd")) + world.register_script(AEntity) assert_ne( world.lookup( diff --git a/unittests/test_simple_systems.gd b/unittests/test_simple_systems.gd index f60347b..463dc43 100644 --- a/unittests/test_simple_systems.gd +++ b/unittests/test_simple_systems.gd @@ -1,4 +1,5 @@ +@tool extends GutTest var world:GFWorld