mirror of
https://github.com/nothings/stb
synced 2024-12-15 04:22:35 +03:00
24 lines
403 B
C
24 lines
403 B
C
#include "stretchy_buffer.h"
|
|
#include <assert.h>
|
|
|
|
int main(int arg, char **argv)
|
|
{
|
|
int i;
|
|
int *arr = NULL;
|
|
|
|
for (i=0; i < 1000000; ++i)
|
|
sb_push(arr, i);
|
|
|
|
assert(sb_count(arr) == 1000000);
|
|
for (i=0; i < 1000000; ++i)
|
|
assert(arr[i] == i);
|
|
|
|
sb_free(arr);
|
|
arr = NULL;
|
|
|
|
for (i=0; i < 1000; ++i)
|
|
sb_add(arr, 1000);
|
|
assert(sb_count(arr) == 1000000);
|
|
|
|
return 0;
|
|
} |