mirror of
https://github.com/godotengine/godot-cpp.git
synced 2026-01-01 05:48:37 +03:00
Correctly handle Object * arguments that were encoded as nullptr
This commit is contained in:
@@ -184,6 +184,10 @@ func _ready():
|
||||
control.queue_free()
|
||||
sprite.queue_free()
|
||||
|
||||
# Test that passing null for objects works as expected too.
|
||||
var example_null : Example = null
|
||||
assert_equal(example.test_object_cast_to_node(example_null), false)
|
||||
|
||||
# Test conversions to and from Variant.
|
||||
assert_equal(example.test_variant_vector2i_conversion(Vector2i(1, 1)), Vector2i(1, 1))
|
||||
assert_equal(example.test_variant_vector2i_conversion(Vector2(1.0, 1.0)), Vector2i(1, 1))
|
||||
|
||||
Reference in New Issue
Block a user