MCPcopy Create free account
hub / github.com/LPC4/Full-Stack / memset_fills_buffer

Function memset_fills_buffer

tests/integration/platform_stdlib.rs:240–260  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

238 assert_eq!(exit, Some(0));
239}
240
241#[test]
242fn hosted_fallible_allocator_aligns_and_preserves_reallocated_bytes() {
243 let (_, exit) = run_hll(
244 r#"
245alloc := import("alloc")
246vec := import("vec")
247owned := import("owned_string")
248arena := import("arena")
249pool := import("pool")
250
251main: () -> i32 {
252 ptr: u8* = 0 as u8*
253 first := alloc.allocate(5, 64)
254 match first {
255 Ok(value) -> { ptr = value }
256 Err(error) -> { return 1 }
257 }
258 if (ptr as u64) % 64 != 0 { return 2 }
259 ptr[0] = 17
260 ptr[4] = 93
261
262 grown: u8* = 0 as u8*
263 resized := alloc.reallocate(ptr, 5, 19, 64)

Callers

nothing calls this directly

Calls 1

run_hllFunction · 0.70

Tested by

no test coverage detected