Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GD-200: SceneRunner get_property returns error on 'null' value #200

Closed
clemens-tolboom opened this issue Jun 12, 2023 · 2 comments
Closed
Assignees
Labels
bug Something isn't working
Milestone

Comments

@clemens-tolboom
Copy link
Contributor

clemens-tolboom commented Jun 12, 2023

The used GdUnit4 version:

4.1.1 (and master)

The used Godot version:

v4.0.3.stable.official [5222a99f5]

OS including version:

MacOS

Describe the bug

Have a nullable var like var x:RefCounted
then run runner.get_property('x')gives a string back

"The property 'x' not exist checked loaded scene."

Steps to Reproduce

extends Node2D

var x:RefCounted

func _ready():
	printt("X == '{0}'".format([x]))

and test

func test_null_value() -> void:
	var runner :GdUnitSceneRunner = scene_runner("res://get_property.tscn")

	var x = runner.get_property("x")
	assert_str(x).is_null()

Minimal reproduction project:

issue_200.zip

@clemens-tolboom clemens-tolboom added the bug Something isn't working label Jun 12, 2023
@MikeSchulze
Copy link
Owner

nice catch 👍

@MikeSchulze MikeSchulze added this to the v4.1.2 milestone Jun 12, 2023
@MikeSchulze MikeSchulze changed the title runner.get_property has a 'null' error GD-200: SceneRunner get_property returns error on 'null' value Jun 12, 2023
@MikeSchulze MikeSchulze linked a pull request Jun 12, 2023 that will close this issue
@clemens-tolboom
Copy link
Contributor Author

clemens-tolboom commented Jun 12, 2023

This is now superseded by #202 thus closes #199

See also #198

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants