diff options
| author | David Snopek <dsnopek@gmail.com> | 2024-04-29 16:46:46 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-04-29 16:46:46 -0500 |
| commit | 2cd3d3910881ed38c6f7a88fe74da98ebc440a09 (patch) | |
| tree | c2cf440085de1efc61d0ebe8abc45c5348058d3d /test | |
| parent | 1d829f2e4a422cd40739cbfb9fbff2a64ddb6d13 (diff) | |
| parent | 37542dc2ec1e98fbe93e2daa8f11e7fb5428cb0e (diff) | |
| download | redot-cpp-2cd3d3910881ed38c6f7a88fe74da98ebc440a09.tar.gz | |
Merge pull request #1405 from dsnopek/fix-null-object-arguments
Correctly handle `Object *` arguments that were encoded as `nullptr`
Diffstat (limited to 'test')
| -rw-r--r-- | test/project/main.gd | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/test/project/main.gd b/test/project/main.gd index 5cf483e..0cfba19 100644 --- a/test/project/main.gd +++ b/test/project/main.gd @@ -191,6 +191,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)) |
