diff options
| author | David Snopek <dsnopek@gmail.com> | 2024-08-27 17:45:23 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-08-27 17:45:23 -0500 |
| commit | d47758910428242169ebe59329b449edf16036e0 (patch) | |
| tree | 4477723e6eaba23d6879363cc59b8067170165d4 /test/src | |
| parent | aac0164b7a9b1dd6aaef4d68c7e1c0ca698d8a6a (diff) | |
| parent | 92ace04989bdf8d7d94846f059eeccd723f9b885 (diff) | |
| download | redot-cpp-d47758910428242169ebe59329b449edf16036e0.tar.gz | |
Merge pull request #1520 from dsnopek/test-library-path-absolute
Add a test to ensure that library path is absolute
Diffstat (limited to 'test/src')
| -rw-r--r-- | test/src/example.cpp | 8 | ||||
| -rw-r--r-- | test/src/example.h | 2 |
2 files changed, 10 insertions, 0 deletions
diff --git a/test/src/example.cpp b/test/src/example.cpp index 84dc176..8075f55 100644 --- a/test/src/example.cpp +++ b/test/src/example.cpp @@ -249,6 +249,8 @@ void Example::_bind_methods() { ClassDB::bind_static_method("Example", D_METHOD("test_static", "a", "b"), &Example::test_static); ClassDB::bind_static_method("Example", D_METHOD("test_static2"), &Example::test_static2); + ClassDB::bind_static_method("Example", D_METHOD("test_library_path"), &Example::test_library_path); + { MethodInfo mi; mi.arguments.push_back(PropertyInfo(Variant::STRING, "some_argument")); @@ -709,6 +711,12 @@ String Example::test_use_engine_singleton() const { return OS::get_singleton()->get_name(); } +String Example::test_library_path() { + String library_path; + internal::gdextension_interface_get_library_path(internal::library, library_path._native_ptr()); + return library_path; +} + void ExampleRuntime::_bind_methods() { ClassDB::bind_method(D_METHOD("set_prop_value", "value"), &ExampleRuntime::set_prop_value); ClassDB::bind_method(D_METHOD("get_prop_value"), &ExampleRuntime::get_prop_value); diff --git a/test/src/example.h b/test/src/example.h index 59c907a..6d88cf1 100644 --- a/test/src/example.h +++ b/test/src/example.h @@ -195,6 +195,8 @@ public: GDVIRTUAL1(_do_something_virtual_with_control, Control *); String test_use_engine_singleton() const; + + static String test_library_path(); }; VARIANT_ENUM_CAST(Example::Constants); |
