From 04688b92fff1d6bbec9335b354f3751ddc473379 Mon Sep 17 00:00:00 2001 From: "Pedro J. Estébanez" Date: Fri, 4 Jun 2021 18:03:15 +0200 Subject: Rename Reference to RefCounted --- modules/gdscript/tests/gdscript_test_runner.cpp | 6 +++--- modules/gdscript/tests/gdscript_test_runner_suite.h | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) (limited to 'modules/gdscript/tests') diff --git a/modules/gdscript/tests/gdscript_test_runner.cpp b/modules/gdscript/tests/gdscript_test_runner.cpp index cda348f774..67bc927517 100644 --- a/modules/gdscript/tests/gdscript_test_runner.cpp +++ b/modules/gdscript/tests/gdscript_test_runner.cpp @@ -511,9 +511,9 @@ GDScriptTest::TestResult GDScriptTest::execute_test_code(bool p_is_generating) { // Create object instance for test. Object *obj = ClassDB::instance(script->get_native()->get_name()); - Ref obj_ref; - if (obj->is_reference()) { - obj_ref = Ref(Object::cast_to(obj)); + Ref obj_ref; + if (obj->is_ref_counted()) { + obj_ref = Ref(Object::cast_to(obj)); } obj->set_script(script); GDScriptInstance *instance = static_cast(obj->get_script_instance()); diff --git a/modules/gdscript/tests/gdscript_test_runner_suite.h b/modules/gdscript/tests/gdscript_test_runner_suite.h index 8fd77239cd..cf4e61f07d 100644 --- a/modules/gdscript/tests/gdscript_test_runner_suite.h +++ b/modules/gdscript/tests/gdscript_test_runner_suite.h @@ -51,7 +51,7 @@ TEST_SUITE("[Modules][GDScript]") { TEST_CASE("[Modules][GDScript] Load source code dynamically and run it") { Ref gdscript = memnew(GDScript); gdscript->set_source_code(R"( -extends Reference +extends RefCounted func _init(): set_meta("result", 42) @@ -64,9 +64,9 @@ func _init(): CHECK_MESSAGE(error == OK, "The script should parse successfully."); // Run the script by assigning it to a reference-counted object. - Ref reference = memnew(Reference); - reference->set_script(gdscript); - CHECK_MESSAGE(int(reference->get_meta("result")) == 42, "The script should assign object metadata successfully."); + Ref ref_counted = memnew(RefCounted); + ref_counted->set_script(gdscript); + CHECK_MESSAGE(int(ref_counted->get_meta("result")) == 42, "The script should assign object metadata successfully."); } } // namespace GDScriptTests -- cgit v1.2.3