Skip to content

Commit 66df851

Browse files
authored
Update world.rs
1 parent 3cbad2d commit 66df851

File tree

1 file changed

+0
-26
lines changed
  • crates/bevy_mod_scripting_core/src/bindings

1 file changed

+0
-26
lines changed

crates/bevy_mod_scripting_core/src/bindings/world.rs

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1385,30 +1385,4 @@ mod test {
13851385
let result = unsafe { guard.with_access_scope(|| 100) };
13861386
assert_eq!(result.unwrap(), 100);
13871387
}
1388-
1389-
#[test]
1390-
fn test_with_access_scope_error_unreleased_access() {
1391-
let mut world = setup_world(|_, _| {});
1392-
let guard = WorldAccessGuard::new(&mut world);
1393-
1394-
// Inside the access scope, claim a global access and do not release it.
1395-
let result: Result<_, InteropError> = unsafe {
1396-
guard.with_access_scope(|| {
1397-
// Claim global access which modifies the access count
1398-
// (simulate an access leak by not calling release_global_access)
1399-
guard.claim_global_access();
1400-
// Return a dummy value
1401-
200
1402-
})
1403-
};
1404-
1405-
assert_eq!(
1406-
result,
1407-
Err(InteropError::invalid_access_count(
1408-
1,
1409-
0,
1410-
"Component/Resource/Allocation locks (accesses) were not released correctly in an access scope"
1411-
))
1412-
);
1413-
}
14141388
}

0 commit comments

Comments
 (0)