diff options
| author | Rémi Verschelde <rverschelde@gmail.com> | 2023-06-08 22:31:51 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-06-08 22:31:51 +0200 |
| commit | d12cf071bbdcfda6875e78167d282278ab420878 (patch) | |
| tree | a137189a1350235fd113a6f615a15b77e9c9e66f /test/src | |
| parent | ee5cf3a11de91d03bdb4ecd1b463a12e5f7b6b90 (diff) | |
| parent | ac98dd2752a49b8e80629a59d7243e589f44358d (diff) | |
| download | redot-cpp-d12cf071bbdcfda6875e78167d282278ab420878.tar.gz | |
Merge pull request #1128 from Mathis-Z/master
Fixing #1127 by making return types of auto-generated functions dynamic
Diffstat (limited to 'test/src')
| -rw-r--r-- | test/src/example.cpp | 5 | ||||
| -rw-r--r-- | test/src/example.h | 1 |
2 files changed, 6 insertions, 0 deletions
diff --git a/test/src/example.cpp b/test/src/example.cpp index e605a45..6c5e736 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 8c8b250..7f1b5b2 100644 --- a/test/src/example.h +++ b/test/src/example.h @@ -115,6 +115,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); |
