Stabilize joinir tests and env guards

This commit is contained in:
2025-12-27 17:41:30 +09:00
parent 88ead0df9f
commit 0d6229d5a2
28 changed files with 444 additions and 127 deletions

View File

@ -109,11 +109,12 @@ pub fn upgrade_weak_handle(weak_handle: i64) -> i64 {
mod tests {
use super::*;
use crate::box_trait::StringBox;
use std::sync::Arc;
#[test]
fn test_weak_handle_marker() {
let strong_handle = 0x0000_0000_0000_0001i64;
let weak_handle = 0x8000_0000_0000_0001i64;
let weak_handle = 0x8000_0000_0000_0001u64 as i64;
assert!(!is_weak_handle(strong_handle));
assert!(is_weak_handle(weak_handle));
@ -132,6 +133,8 @@ mod tests {
let strong_handle = upgrade_weak_handle(weak_handle);
assert!(strong_handle > 0);
crate::runtime::host_handles::drop_handle(strong_handle as u64);
// Drop arc
drop(arc);