Browse Source

API testcase trivia fixes for -m32

pull/1481/head
Sami Vaarala 8 years ago
parent
commit
dd9c031d01
  1. 10
      tests/api/test-get-buffer-data-default.c
  2. 4
      tests/api/test-get-buffer-default.c

10
tests/api/test-get-buffer-data-default.c

@ -141,7 +141,7 @@ static duk_ret_t test_slice(duk_context *ctx, void *udata) {
sz = (duk_size_t) 0xdeadbeefUL;
p = duk_get_buffer_data_default(ctx, -1, &sz, (void *) 0x12345678UL, (duk_size_t) 0x87654321UL);
if (p) {
printf("p is not NULL, sz=%ld\n", (long) sz);
printf("p is not NULL, sz=%lu\n", (unsigned long) sz);
for (i = 0; i < sz; i++) {
printf("p[%ld] = 0x%02x\n", (long) i, (unsigned int) p[i]);
}
@ -183,7 +183,7 @@ static duk_ret_t test_uncovered_buffer(duk_context *ctx, void *udata) {
sz = (duk_size_t) 0xdeadbeefUL;
p = duk_get_buffer_data_default(ctx, -1, &sz, (void *) 0x12345678UL, (duk_size_t) 0x87654321UL);
if (p) {
printf("p is not NULL, sz=%ld\n", (long) sz);
printf("p is not NULL, sz=%lu\n", (unsigned long) sz);
} else {
printf("p is NULL\n");
}
@ -193,7 +193,7 @@ static duk_ret_t test_uncovered_buffer(duk_context *ctx, void *udata) {
sz = (duk_size_t) 0xdeadbeefUL;
p = duk_get_buffer_data_default(ctx, -1, &sz, (void *) 0x12345678UL, (duk_size_t) 0x87654321UL);
if (p) {
printf("p is not NULL, sz=%ld\n", (long) sz);
printf("p is not NULL, sz=%lu\n", (unsigned long) sz);
} else {
printf("p is NULL\n");
}
@ -203,7 +203,7 @@ static duk_ret_t test_uncovered_buffer(duk_context *ctx, void *udata) {
sz = (duk_size_t) 0xdeadbeefUL;
p = duk_get_buffer_data_default(ctx, -1, &sz, (void *) 0x12345678UL, (duk_size_t) 0x87654321UL);
if (p) {
printf("p is not NULL, sz=%ld\n", (long) sz);
printf("p is not NULL, sz=%lu\n", (unsigned long) sz);
} else {
printf("p is NULL\n");
}
@ -228,7 +228,7 @@ static duk_ret_t test_invalid_index(duk_context *ctx, void *udata) {
sz = (duk_size_t) 0xdeadbeefUL;
p = duk_get_buffer_data_default(ctx, -1, &sz, (void *) 0x12345678UL, (duk_size_t) 0x87654321UL);
if (p) {
printf("p is not NULL, sz=%ld\n", (long) sz);
printf("p is not NULL, sz=%lu\n", (unsigned long) sz);
} else {
printf("p is NULL\n");
}

4
tests/api/test-get-buffer-default.c

@ -114,7 +114,7 @@ static duk_ret_t test_invalid_index(duk_context *ctx, void *udata) {
sz = (duk_size_t) 0xdeadbeefUL;
p = duk_get_buffer_default(ctx, -1, &sz, (void *) 0x12345678UL, (duk_size_t) 0x87654321UL);
if (p) {
printf("p is not NULL, sz=%ld\n", (long) sz);
printf("p is not NULL, sz=%lu\n", (unsigned long) sz);
} else {
printf("p is NULL\n");
}
@ -142,7 +142,7 @@ static duk_ret_t test_buffer_object(duk_context *ctx, void *udata) {
sz = (duk_size_t) 0xdeadbeefUL;
p = duk_get_buffer_default(ctx, -1, &sz, (void *) 0x12345678UL, (duk_size_t) 0x87654321UL);
if (p) {
printf("p is not NULL, sz=%ld\n", (long) sz);
printf("p is not NULL, sz=%lu\n", (unsigned long) sz);
} else {
printf("p is NULL\n");
}

Loading…
Cancel
Save