Stabilize joinir tests and env guards
This commit is contained in:
@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user