stretch_test.c 542 B

1234567891011121314151617181920212223242526272829
  1. // check that stb_truetype compiles with no stb_rect_pack.h
  2. #define STB_TRUETYPE_IMPLEMENTATION
  3. #include "stb_truetype.h"
  4. #define STB_DS_IMPLEMENTATION
  5. #include "stb_ds.h"
  6. #include <assert.h>
  7. int main(int arg, char **argv)
  8. {
  9. int i;
  10. int *arr = NULL;
  11. for (i=0; i < 1000000; ++i)
  12. arrput(arr, i);
  13. assert(arrlen(arr) == 1000000);
  14. for (i=0; i < 1000000; ++i)
  15. assert(arr[i] == i);
  16. arrfree(arr);
  17. arr = NULL;
  18. for (i=0; i < 1000; ++i)
  19. arrput(arr, 1000);
  20. assert(arrlen(arr) == 1000000);
  21. return 0;
  22. }