[ox] Cleanup Vector

This commit is contained in:
2023-06-13 23:51:13 -05:00
parent 20e5b7e617
commit dde51151ff
5 changed files with 125 additions and 65 deletions

View File

@@ -20,8 +20,8 @@ static std::map<ox::String, ox::Error(*)()> tests = {
ox::heapmgr::initHeap(&buff[0], &buff[buff.size()-1]);
auto a1 = static_cast<char*>(ox::heapmgr::malloc(5));
auto a2 = static_cast<char*>(ox::heapmgr::malloc(5));
oxAssert(a1 >= &buff.front().value && a1 < &buff.back().value, "malloc is broken");
oxAssert(a2 >= &buff.front().value && a2 < &buff.back().value && a2 > a1 + 5, "malloc is broken");
oxAssert(a1 >= buff.front().unwrap() && a1 < buff.back().unwrap(), "malloc is broken");
oxAssert(a2 >= buff.front().unwrap() && a2 < buff.back().unwrap() && a2 > a1 + 5, "malloc is broken");
return OxError(0);
}
},