mirror of
https://github.com/fastfetch-cli/fastfetch.git
synced 2026-11-09 06:30:10 +01:00
Util (mallocHelper): implements ffMallocUsableSize and uses it
This commit is contained in:
+10
-1
@@ -229,9 +229,18 @@ int main(void)
|
||||
|
||||
ffStrbufDestroy(&strbuf);
|
||||
|
||||
//initMoveS
|
||||
{
|
||||
char* heapStr = strdup("1234567890");
|
||||
ffStrbufInitMoveS(&strbuf, heapStr);
|
||||
VERIFY(ffStrbufEqualS(&strbuf, "1234567890"));
|
||||
VERIFY(strbuf.allocated >= 11);
|
||||
ffStrbufDestroy(&strbuf);
|
||||
}
|
||||
|
||||
//initF
|
||||
ffStrbufInitF(&strbuf, "%s", "1234567890123456789012345678901");
|
||||
VERIFY(strbuf.allocated == 32);
|
||||
VERIFY(strbuf.allocated >= 32);
|
||||
VERIFY(ffStrbufEqualS(&strbuf, "1234567890123456789012345678901"));
|
||||
|
||||
//containC
|
||||
|
||||
Reference in New Issue
Block a user