MCPcopy Create free account
hub / github.com/elast0ny/shared_memory / create_new

Function create_new

tests/general.rs:6–17  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

4
5#[test]
6fn create_new() {
7 let mut s = ShmemConf::new().size(4090).create().unwrap();
8
9 assert!(s.is_owner());
10 assert!(!s.get_os_id().is_empty());
11 assert!(s.len() >= 4090);
12 assert!(!s.as_ptr().is_null());
13 unsafe {
14 assert_eq!(s.as_slice().len(), s.len());
15 assert_eq!(s.as_slice_mut().len(), s.len());
16 }
17}
18
19#[test]
20fn create_with_flink() {

Callers

nothing calls this directly

Calls 2

createMethod · 0.80
sizeMethod · 0.80

Tested by

no test coverage detected