()
| 524 | } |
| 525 | |
| 526 | #[test] |
| 527 | fn hosted_vec_grows_and_preserves_elements() { |
| 528 | let (_, exit) = run_hll( |
| 529 | r#" |
| 530 | alloc := import("alloc") |
| 531 | vec := import("vec") |
| 532 | owned := import("owned_string") |
| 533 | arena := import("arena") |
| 534 | pool := import("pool") |
| 535 | |
| 536 | main: () -> i32 { |
| 537 | v: vec.Vec<i64> = { .ptr = null, .len = 0, .capacity = 0 } |
| 538 | vec.Vec_init<i64>(&v) |
| 539 | if v.len != 0 or v.capacity != 0 { return 1 } |
| 540 | |
| 541 | i: i64 = 0 |
nothing calls this directly
no test coverage detected