Skip to content

Commit

Permalink
stb_hexwave added, stretchy_buffer.h deprecated
Browse files Browse the repository at this point in the history
  • Loading branch information
Sean Barrett committed Apr 1, 2021
1 parent b42009b commit 559d759
Show file tree
Hide file tree
Showing 7 changed files with 659 additions and 39 deletions.
13 changes: 7 additions & 6 deletions tests/stretch_test.c → deprecated/stretch_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
#define STB_TRUETYPE_IMPLEMENTATION
#include "stb_truetype.h"

#include "stretchy_buffer.h"
#define STB_DS_IMPLEMENTATION
#include "stb_ds.h"
#include <assert.h>

int main(int arg, char **argv)
Expand All @@ -11,18 +12,18 @@ int main(int arg, char **argv)
int *arr = NULL;

for (i=0; i < 1000000; ++i)
sb_push(arr, i);
arrput(arr, i);

assert(sb_count(arr) == 1000000);
assert(arrlen(arr) == 1000000);
for (i=0; i < 1000000; ++i)
assert(arr[i] == i);

sb_free(arr);
arrfree(arr);
arr = NULL;

for (i=0; i < 1000; ++i)
sb_add(arr, 1000);
assert(sb_count(arr) == 1000000);
arrput(arr, 1000);
assert(arrlen(arr) == 1000000);

return 0;
}
File renamed without changes.
Loading

0 comments on commit 559d759

Please sign in to comment.