stb/tests/stretch_test.c
Sean Barrett 26439254e8 fix use of stbrp_coord if no stb_rect_pack;
fix a few assert()s that weren't STBTT_asserts();
fix missing cast for C++
fix typo in C++ test compilation that prevented it from trying to compile stb_truetype
2014-12-10 00:27:11 -08:00

28 lines
526 B
C

// check that stb_truetype compiles with no stb_rect_pack.h
#define STB_TRUETYPE_IMPLEMENTATION
#include "stb_truetype.h"
#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;
}