Change example code to properly represent test cases with refcounted objects
This commit is contained in:
@@ -28,7 +28,10 @@ func _ready():
|
||||
($Example as Example).simple_const_func() # Force use of ptrcall
|
||||
prints(" returned", $Example.return_something("some string"))
|
||||
prints(" returned const", $Example.return_something_const())
|
||||
prints(" returned ref", $Example.return_extended_ref())
|
||||
var null_ref = $Example.return_empty_ref()
|
||||
prints(" returned empty ref", null_ref)
|
||||
var ret_ref = $Example.return_extended_ref()
|
||||
prints(" returned ref", ret_ref.get_instance_id(), ", id:", ret_ref.get_id())
|
||||
prints(" returned ", $Example.get_v4())
|
||||
|
||||
prints("VarArg method calls")
|
||||
|
||||
@@ -3,13 +3,15 @@
|
||||
[ext_resource type="Script" path="res://main.gd" id="1_c326s"]
|
||||
|
||||
[node name="Node" type="Node"]
|
||||
script = ExtResource( "1_c326s" )
|
||||
script = ExtResource("1_c326s")
|
||||
|
||||
[node name="Example" type="Example" parent="."]
|
||||
|
||||
[node name="ExampleMin" type="ExampleMin" parent="Example"]
|
||||
layout_mode = 0
|
||||
|
||||
[node name="Label" type="Label" parent="Example"]
|
||||
layout_mode = 0
|
||||
offset_left = 194.0
|
||||
offset_top = -2.0
|
||||
offset_right = 234.0
|
||||
|
||||
Reference in New Issue
Block a user