summaryrefslogtreecommitdiffstats
path: root/test/src
diff options
context:
space:
mode:
authorDavid Snopek <dsnopek@gmail.com>2024-10-29 13:09:45 -0500
committerGitHub <noreply@github.com>2024-10-29 13:09:45 -0500
commit7fca5458854c30fed862609cf516910e432508c1 (patch)
tree957304f3c4004fd947c5a83c60273a40c4916f5f /test/src
parentdfdc0474597a5c7918a3101529f0e2c69cf18d8b (diff)
parent536ea8561e00b8d6183ddc522476dd232c1d3bef (diff)
downloadredot-cpp-7fca5458854c30fed862609cf516910e432508c1.tar.gz
Merge pull request #1574 from dsnopek/unicode-class-names
Allow unicode class names
Diffstat (limited to 'test/src')
-rw-r--r--test/src/example.cpp8
-rw-r--r--test/src/example.h10
-rw-r--r--test/src/register_types.cpp1
3 files changed, 19 insertions, 0 deletions
diff --git a/test/src/example.cpp b/test/src/example.cpp
index 692d004..f51db57 100644
--- a/test/src/example.cpp
+++ b/test/src/example.cpp
@@ -755,3 +755,11 @@ ExampleRuntime::ExampleRuntime() {
ExampleRuntime::~ExampleRuntime() {
}
+
+void ExamplePrzykład::_bind_methods() {
+ ClassDB::bind_method(D_METHOD("get_the_word"), &ExamplePrzykład::get_the_word);
+}
+
+String ExamplePrzykład::get_the_word() const {
+ return U"słowo to przykład";
+}
diff --git a/test/src/example.h b/test/src/example.h
index a28deff..3ce390a 100644
--- a/test/src/example.h
+++ b/test/src/example.h
@@ -275,4 +275,14 @@ public:
~ExampleRuntime();
};
+class ExamplePrzykład : public RefCounted {
+ GDCLASS(ExamplePrzykład, RefCounted);
+
+protected:
+ static void _bind_methods();
+
+public:
+ String get_the_word() const;
+};
+
#endif // EXAMPLE_CLASS_H
diff --git a/test/src/register_types.cpp b/test/src/register_types.cpp
index 7cfe689..d9290c8 100644
--- a/test/src/register_types.cpp
+++ b/test/src/register_types.cpp
@@ -30,6 +30,7 @@ void initialize_example_module(ModuleInitializationLevel p_level) {
GDREGISTER_CLASS(ExampleBase);
GDREGISTER_CLASS(ExampleChild);
GDREGISTER_RUNTIME_CLASS(ExampleRuntime);
+ GDREGISTER_CLASS(ExamplePrzykład);
}
void uninitialize_example_module(ModuleInitializationLevel p_level) {