FFstrbuf: improve performance of InitF

This commit is contained in:
李通洲
2022-12-06 16:26:51 +08:00
parent 4f0be4f72c
commit 983bd50a09
3 changed files with 25 additions and 5 deletions
+7
View File
@@ -199,6 +199,13 @@ int main(int argc, char** argv)
ffStrbufDestroy(&strbuf);
//initF
ffStrbufInitF(&strbuf, "%s", "1234567890123456789012345678901");
VERIFY(strbuf.allocated == 32);
VERIFY(ffStrbufEqualS(&strbuf, "1234567890123456789012345678901"));
ffStrbufDestroy(&strbuf);
//Success
puts("\033[32mAll tests passed!"FASTFETCH_TEXT_MODIFIER_RESET);
}