fix(v1.0.2): Array grow from 0, Map/Set rehash, checked div/mod
ci / build (ubuntu) (push) Has been cancelled
ci / macos smoke (push) Has been cancelled
ci / windows smoke (push) Has been cancelled
selfhost-loop / bootstrap determinism (push) Has been cancelled
ci / unit + fmt (push) Has been cancelled
ci / examples (push) Has been cancelled
ci / goldens + tools (push) Has been cancelled
ci / apps (push) Has been cancelled
ci / selfhost smoke (push) Has been cancelled
ci / CI gate (push) Has been cancelled
ci / build (ubuntu) (push) Has been cancelled
ci / macos smoke (push) Has been cancelled
ci / windows smoke (push) Has been cancelled
selfhost-loop / bootstrap determinism (push) Has been cancelled
ci / unit + fmt (push) Has been cancelled
ci / examples (push) Has been cancelled
ci / goldens + tools (push) Has been cancelled
ci / apps (push) Has been cancelled
ci / selfhost smoke (push) Has been cancelled
ci / CI gate (push) Has been cancelled
- Array_Push grows from cap 0 (same min as Insert) to avoid segfault - Map/StringMap/Set: default min cap 8 and auto-rehash at ~50% load - Integer / and % emit bux_div_i64 / bux_mod_i64 (panic instead of SIGFPE) - Bump version to 1.0.2; stdlib golden regressions; fmt clean
This commit is contained in:
@@ -11,6 +11,15 @@ import Std::Test::{
|
||||
};
|
||||
|
||||
func Main() -> int {
|
||||
// Zero-capacity grow (v1.0.2): must not segfault
|
||||
var z: Array<int> = Array_New<int>(0);
|
||||
Array_Push<int>(&z, 7);
|
||||
Array_Push<int>(&z, 8);
|
||||
Test_AssertEqInt(Array_Len<int>(&z) as int, 2);
|
||||
Test_AssertEqInt(Array_Get<int>(&z, 0), 7);
|
||||
Test_AssertEqInt(Array_Get<int>(&z, 1), 8);
|
||||
Array_Free<int>(&z);
|
||||
|
||||
var arr: Array<int> = Array_New<int>(2);
|
||||
Array_Reserve<int>(&arr, 8);
|
||||
Test_AssertTrue(Array_Cap<int>(&arr) >= 8);
|
||||
|
||||
Reference in New Issue
Block a user