diff options
Diffstat (limited to 'modules/gdscript/tests/gdscript_test_runner.cpp')
| -rw-r--r-- | modules/gdscript/tests/gdscript_test_runner.cpp | 13 | 
1 files changed, 6 insertions, 7 deletions
| diff --git a/modules/gdscript/tests/gdscript_test_runner.cpp b/modules/gdscript/tests/gdscript_test_runner.cpp index e8ddf90836..ea51990237 100644 --- a/modules/gdscript/tests/gdscript_test_runner.cpp +++ b/modules/gdscript/tests/gdscript_test_runner.cpp @@ -70,7 +70,7 @@ void init_autoloads() {  			continue;  		} -		RES res = ResourceLoader::load(info.path); +		Ref<Resource> res = ResourceLoader::load(info.path);  		ERR_CONTINUE_MSG(res.is_null(), "Can't autoload: " + info.path);  		Node *n = nullptr;  		Ref<PackedScene> scn = res; @@ -80,7 +80,7 @@ void init_autoloads() {  		} else if (script.is_valid()) {  			StringName ibt = script->get_instance_base_type();  			bool valid_type = ClassDB::is_parent_class(ibt, "Node"); -			ERR_CONTINUE_MSG(!valid_type, "Script does not inherit a Node: " + info.path); +			ERR_CONTINUE_MSG(!valid_type, "Script does not inherit from Node: " + info.path);  			Object *obj = ClassDB::instantiate(ibt); @@ -229,7 +229,7 @@ bool GDScriptTestRunner::generate_outputs() {  bool GDScriptTestRunner::make_tests_for_dir(const String &p_dir) {  	Error err = OK; -	DirAccessRef dir(DirAccess::open(p_dir, &err)); +	Ref<DirAccess> dir(DirAccess::open(p_dir, &err));  	if (err != OK) {  		return false; @@ -254,7 +254,7 @@ bool GDScriptTestRunner::make_tests_for_dir(const String &p_dir) {  #ifndef DEBUG_ENABLED  				// On release builds, skip tests marked as debug only.  				Error open_err = OK; -				FileAccessRef script_file(FileAccess::open(current_dir.plus_file(next), FileAccess::READ, &open_err)); +				Ref<FileAccess> script_file(FileAccess::open(current_dir.plus_file(next), FileAccess::READ, &open_err));  				if (open_err != OK) {  					ERR_PRINT(vformat(R"(Couldn't open test file "%s".)", next));  					next = dir->get_next(); @@ -286,7 +286,7 @@ bool GDScriptTestRunner::make_tests_for_dir(const String &p_dir) {  bool GDScriptTestRunner::make_tests() {  	Error err = OK; -	DirAccessRef dir(DirAccess::open(source_dir, &err)); +	Ref<DirAccess> dir(DirAccess::open(source_dir, &err));  	ERR_FAIL_COND_V_MSG(err != OK, false, "Could not open specified test directory."); @@ -611,7 +611,7 @@ bool GDScriptTest::generate_output() {  	}  	Error err = OK; -	FileAccessRef out_file = FileAccess::open(output_file, FileAccess::WRITE, &err); +	Ref<FileAccess> out_file = FileAccess::open(output_file, FileAccess::WRITE, &err);  	if (err != OK) {  		return false;  	} @@ -620,7 +620,6 @@ bool GDScriptTest::generate_output() {  	output += "\n"; // Make sure to insert newline for CI static checks.  	out_file->store_string(output); -	out_file->close();  	return true;  } |