X-Git-Url: https://git.danieliu.xyz/?a=blobdiff_plain;f=test%2Fcstring.c;h=217566393b39638345ecbd20fe5f7cc3e6760188;hb=ecb540df90fa1b07218b20e5893a8c58d90447a9;hp=70892a61e23314807d7921bc9e89a674029b3d05;hpb=32639324a5ed0b1678d1066680ed6d2e469ae271;p=smdp.git diff --git a/test/cstring.c b/test/cstring.c index 70892a6..2175663 100644 --- a/test/cstring.c +++ b/test/cstring.c @@ -7,35 +7,37 @@ int main(int argc, char *argv[]) { // testing with char cstring_t *p = cstring_init(); - printf("text: %s, size: %i, alloc: %i\n", p->text, p->size, p->alloc); - - (p->expand)(p, 'X'); printf("text: %s, size: %i, alloc: %i\n", p->text, p->size, p->alloc); - (p->expand)(p, 'X'); printf("text: %s, size: %i, alloc: %i\n", p->text, p->size, p->alloc); - (p->expand)(p, 'X'); printf("text: %s, size: %i, alloc: %i\n", p->text, p->size, p->alloc); - (p->expand)(p, 'X'); printf("text: %s, size: %i, alloc: %i\n", p->text, p->size, p->alloc); - (p->expand)(p, 'X'); printf("text: %s, size: %i, alloc: %i\n", p->text, p->size, p->alloc); - (p->expand)(p, 'X'); printf("text: %s, size: %i, alloc: %i\n", p->text, p->size, p->alloc); - (p->expand)(p, 'X'); printf("text: %s, size: %i, alloc: %i\n", p->text, p->size, p->alloc); - (p->expand)(p, 'X'); printf("text: %s, size: %i, alloc: %i\n", p->text, p->size, p->alloc); - (p->expand)(p, 'X'); printf("text: %s, size: %i, alloc: %i\n", p->text, p->size, p->alloc); - (p->expand)(p, 'X'); printf("text: %s, size: %i, alloc: %i\n", p->text, p->size, p->alloc); + printf("text: %s, size: %zu, alloc: %zu\n", p->text, p->size, p->alloc); + + (p->expand)(p, 'X'); printf("text: %s, size: %zu, alloc: %zu\n", p->text, p->size, p->alloc); + (p->expand)(p, 'X'); printf("text: %s, size: %zu, alloc: %zu\n", p->text, p->size, p->alloc); + (p->expand)(p, 'X'); printf("text: %s, size: %zu, alloc: %zu\n", p->text, p->size, p->alloc); + (p->expand)(p, 'X'); printf("text: %s, size: %zu, alloc: %zu\n", p->text, p->size, p->alloc); + (p->expand)(p, 'X'); printf("text: %s, size: %zu, alloc: %zu\n", p->text, p->size, p->alloc); + (p->expand)(p, 'X'); printf("text: %s, size: %zu, alloc: %zu\n", p->text, p->size, p->alloc); + (p->expand)(p, 'X'); printf("text: %s, size: %zu, alloc: %zu\n", p->text, p->size, p->alloc); + (p->expand)(p, 'X'); printf("text: %s, size: %zu, alloc: %zu\n", p->text, p->size, p->alloc); + (p->expand)(p, 'X'); printf("text: %s, size: %zu, alloc: %zu\n", p->text, p->size, p->alloc); + (p->expand)(p, 'X'); printf("text: %s, size: %zu, alloc: %zu\n", p->text, p->size, p->alloc); (p->reset)(p); - printf("text: %s, size: %i, alloc: %i\n", p->text, p->size, p->alloc); + printf("text: %s, size: %zu, alloc: %zu\n", p->text, p->size, p->alloc); char x[2] = {'X', '\0'}; - (p->expand_arr)(p, x); printf("text: %s, size: %i, alloc: %i\n", p->text, p->size, p->alloc); - (p->expand_arr)(p, x); printf("text: %s, size: %i, alloc: %i\n", p->text, p->size, p->alloc); - (p->expand_arr)(p, x); printf("text: %s, size: %i, alloc: %i\n", p->text, p->size, p->alloc); - (p->expand_arr)(p, x); printf("text: %s, size: %i, alloc: %i\n", p->text, p->size, p->alloc); - (p->expand_arr)(p, x); printf("text: %s, size: %i, alloc: %i\n", p->text, p->size, p->alloc); - (p->expand_arr)(p, x); printf("text: %s, size: %i, alloc: %i\n", p->text, p->size, p->alloc); - (p->expand_arr)(p, x); printf("text: %s, size: %i, alloc: %i\n", p->text, p->size, p->alloc); - (p->expand_arr)(p, x); printf("text: %s, size: %i, alloc: %i\n", p->text, p->size, p->alloc); - (p->expand_arr)(p, x); printf("text: %s, size: %i, alloc: %i\n", p->text, p->size, p->alloc); - (p->expand_arr)(p, x); printf("text: %s, size: %i, alloc: %i\n", p->text, p->size, p->alloc); + (p->expand_arr)(p, x); printf("text: %s, size: %zu, alloc: %zu\n", p->text, p->size, p->alloc); + (p->expand_arr)(p, x); printf("text: %s, size: %zu, alloc: %zu\n", p->text, p->size, p->alloc); + (p->expand_arr)(p, x); printf("text: %s, size: %zu, alloc: %zu\n", p->text, p->size, p->alloc); + (p->expand_arr)(p, x); printf("text: %s, size: %zu, alloc: %zu\n", p->text, p->size, p->alloc); + (p->expand_arr)(p, x); printf("text: %s, size: %zu, alloc: %zu\n", p->text, p->size, p->alloc); + (p->expand_arr)(p, x); printf("text: %s, size: %zu, alloc: %zu\n", p->text, p->size, p->alloc); + (p->expand_arr)(p, x); printf("text: %s, size: %zu, alloc: %zu\n", p->text, p->size, p->alloc); + (p->expand_arr)(p, x); printf("text: %s, size: %zu, alloc: %zu\n", p->text, p->size, p->alloc); + (p->expand_arr)(p, x); printf("text: %s, size: %zu, alloc: %zu\n", p->text, p->size, p->alloc); + (p->expand_arr)(p, x); printf("text: %s, size: %zu, alloc: %zu\n", p->text, p->size, p->alloc); (p->delete)(p); + + return(0); }