stlib arraylist
This commit is contained in:
@@ -92,6 +92,14 @@ typed_allocator_test func() i32 {
|
||||
typed[0] = 10
|
||||
typed[3] = 20
|
||||
if (typed[0] + typed[3] != 30) return 39
|
||||
typed = mem.realloc(i32, mem.c_allocator, typed, 8) catch |_| {
|
||||
return 41
|
||||
}
|
||||
if (typed.len != 8 or typed[0] != 10 or typed[3] != 20) return 42
|
||||
typed = mem.realloc(i32, mem.c_allocator, typed, 2) catch |_| {
|
||||
return 43
|
||||
}
|
||||
if (typed.len != 2 or typed[0] != 10) return 44
|
||||
|
||||
return 0
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user