Team Fortress 2 Source Code as on 22/4/2020
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

27 lines
526 B

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