()
| 67 | #[cfg(feature="stdlib")] |
| 68 | #[test] |
| 69 | fn std_heap_test() { |
| 70 | let mut halloc = HeapAlloc::<u8>::new(0); |
| 71 | for _i in 1..10 { // heap test |
| 72 | let mut x = halloc.alloc_cell(100000); |
| 73 | x.slice_mut()[0] = 4; |
| 74 | let mut y = halloc.alloc_cell(110000); |
| 75 | y.slice_mut()[0] = 5; |
| 76 | let mut z = halloc.alloc_cell(120000); |
| 77 | z.slice_mut()[0] = 6; |
| 78 | assert_eq!(y.slice()[0], 5); |
| 79 | halloc.free_cell(y); |
| 80 | assert_eq!(x.slice()[0], 4); |
| 81 | assert_eq!(x.slice()[9], 0); |
| 82 | assert_eq!(z.slice()[0], 6); |
| 83 | } |
| 84 | |
| 85 | } |
nothing calls this directly
no test coverage detected