summaryrefslogtreecommitdiffstats
path: root/test/src
diff options
context:
space:
mode:
authorMathis-Z <Mathis.Zscheischler@gmail.com>2023-05-30 22:35:05 +0200
committerMathis-Z <Mathis.Zscheischler@gmail.com>2023-06-08 20:35:29 +0200
commitac98dd2752a49b8e80629a59d7243e589f44358d (patch)
treef14dcf932b355e5c523a5e28e36827754fe46be4 /test/src
parentaef9ea73875ac763a89d1c51307f53faa87d535f (diff)
downloadredot-cpp-ac98dd2752a49b8e80629a59d7243e589f44358d.tar.gz
Fixing #1127 by making return types of auto-generated functions dynamic
Diffstat (limited to 'test/src')
-rw-r--r--test/src/example.cpp5
-rw-r--r--test/src/example.h1
2 files changed, 6 insertions, 0 deletions
diff --git a/test/src/example.cpp b/test/src/example.cpp
index 6d24379..cb83dc7 100644
--- a/test/src/example.cpp
+++ b/test/src/example.cpp
@@ -127,6 +127,7 @@ void Example::_bind_methods() {
ClassDB::bind_method(D_METHOD("test_dictionary"), &Example::test_dictionary);
ClassDB::bind_method(D_METHOD("test_node_argument"), &Example::test_node_argument);
ClassDB::bind_method(D_METHOD("test_string_ops"), &Example::test_string_ops);
+ ClassDB::bind_method(D_METHOD("test_str_utility"), &Example::test_str_utility);
ClassDB::bind_method(D_METHOD("test_vector_ops"), &Example::test_vector_ops);
ClassDB::bind_method(D_METHOD("test_bitfield", "flags"), &Example::test_bitfield);
@@ -280,6 +281,10 @@ String Example::test_string_ops() const {
return s;
}
+String Example::test_str_utility() const {
+ return UtilityFunctions::str("Hello, ", "World", "! The answer is ", 42);
+}
+
int Example::test_vector_ops() const {
PackedInt32Array arr;
arr.push_back(10);
diff --git a/test/src/example.h b/test/src/example.h
index ebf9156..dda4230 100644
--- a/test/src/example.h
+++ b/test/src/example.h
@@ -114,6 +114,7 @@ public:
Dictionary test_dictionary() const;
Example *test_node_argument(Example *p_node) const;
String test_string_ops() const;
+ String test_str_utility() const;
int test_vector_ops() const;
BitField<Flags> test_bitfield(BitField<Flags> flags);