File tree Expand file tree Collapse file tree 2 files changed +14
-1
lines changed Expand file tree Collapse file tree 2 files changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -116,7 +116,7 @@ int main(void)
116116
117117 {
118118 FF_LIST_AUTO_DESTROY test = ffListCreate (1 );
119- VERIFY (test .elementSize = 1 );
119+ VERIFY (test .elementSize == 1 );
120120 VERIFY (test .capacity == 0 );
121121 VERIFY (test .length == 0 );
122122 }
Original file line number Diff line number Diff line change @@ -442,6 +442,19 @@ int main(void)
442442 VERIFY (ffStrbufEqualS (& strbuf , "AA12BB3456CCDD" ));
443443 ffStrbufDestroy (& strbuf );
444444
445+ // smallest allocation test
446+ {
447+ FF_STRBUF_AUTO_DESTROY strbuf1 = ffStrbufCreateA (10 );
448+ VERIFY (strbuf1 .allocated == 10 );
449+ ffStrbufEnsureFree (& strbuf1 , 16 );
450+ VERIFY (strbuf1 .allocated == 32 );
451+
452+ FF_STRBUF_AUTO_DESTROY strbuf2 = ffStrbufCreate ();
453+ VERIFY (strbuf2 .allocated == 0 );
454+ ffStrbufEnsureFree (& strbuf2 , 16 );
455+ VERIFY (strbuf2 .allocated == 32 );
456+ }
457+
445458 //Success
446459 puts ("\e[32mAll tests passed!" FASTFETCH_TEXT_MODIFIER_RESET );
447460}
You can’t perform that action at this time.
0 commit comments