summaryrefslogtreecommitdiffstats
path: root/test/src/example.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/src/example.cpp')
-rw-r--r--test/src/example.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/test/src/example.cpp b/test/src/example.cpp
index a941889..84dc176 100644
--- a/test/src/example.cpp
+++ b/test/src/example.cpp
@@ -204,6 +204,7 @@ void Example::_bind_methods() {
ClassDB::bind_method(D_METHOD("test_str_utility"), &Example::test_str_utility);
ClassDB::bind_method(D_METHOD("test_string_is_forty_two"), &Example::test_string_is_forty_two);
ClassDB::bind_method(D_METHOD("test_string_resize"), &Example::test_string_resize);
+ ClassDB::bind_method(D_METHOD("test_typed_array_of_packed"), &Example::test_typed_array_of_packed);
ClassDB::bind_method(D_METHOD("test_vector_ops"), &Example::test_vector_ops);
ClassDB::bind_method(D_METHOD("test_vector_init_list"), &Example::test_vector_init_list);
@@ -424,6 +425,19 @@ String Example::test_string_resize(String p_string) const {
return p_string;
}
+TypedArray<PackedInt32Array> Example::test_typed_array_of_packed() const {
+ TypedArray<PackedInt32Array> arr;
+ PackedInt32Array packed_arr1;
+ packed_arr1.push_back(1);
+ packed_arr1.push_back(2);
+ arr.push_back(packed_arr1);
+ PackedInt32Array packed_arr2;
+ packed_arr2.push_back(3);
+ packed_arr2.push_back(4);
+ arr.push_back(packed_arr2);
+ return arr;
+}
+
int Example::test_vector_ops() const {
PackedInt32Array arr;
arr.push_back(10);