This repository has been archived on 2026-10-10. You can view files and clone it, but cannot push or open issues or pull requests.
molotov/crates/molotov-core/tests/jni_objects_test.rs

12 lines
427 B
Rust

// SPDX-License-Identifier: GPL-3.0-or-later
use molotov_core::jni::objects::JniObjectRegistry;
#[test]
fn test_jni_string_allocation_and_read() {
let mut registry = JniObjectRegistry::new();
let str_handle = registry.alloc_string("hello_roblox");
assert_eq!(registry.get_string(str_handle), Some("hello_roblox"));
registry.release_object(str_handle);
assert_eq!(registry.get_string(str_handle), None);
}