Commit df6f0988 authored by unknown's avatar unknown

ndb_test_platform.cpp:

  better printouts in ndb_test_platform


ndb/tools/ndb_test_platform.cpp:
  better printouts in ndb_test_platform
parent 0fa48ea4
...@@ -32,19 +32,21 @@ int test_snprintf(const char * fmt, int buf_sz, int result) ...@@ -32,19 +32,21 @@ int test_snprintf(const char * fmt, int buf_sz, int result)
if(ret < 0) if(ret < 0)
{ {
printf("BaseString::snprint returns %d\n", ret); printf("BaseString::snprint returns %d with size=%d and strlen(fmt)=%d\n",
ret, buf_sz, strlen(fmt));
return -1; return -1;
} }
if(ret+1 == buf_sz) if(ret+1 == buf_sz)
{ {
printf("BaseString::snprint truncates\n"); printf("BaseString::snprint truncates returns %d with size=%d and strlen(fmt)=%d\n",
ret, buf_sz, strlen(fmt));
return -1; return -1;
} }
if(ret != result) if(ret != result)
{ {
printf("BaseString::snprint returns incorrect value: %d != %d\n", printf("BaseString::snprint returns incorrect value: returned=%d != expected=%d\n",
ret, result); ret, result);
return -1; return -1;
} }
...@@ -54,7 +56,7 @@ int test_snprintf(const char * fmt, int buf_sz, int result) ...@@ -54,7 +56,7 @@ int test_snprintf(const char * fmt, int buf_sz, int result)
if(buf[ret] != fmt[ret]) if(buf[ret] != fmt[ret])
{ {
printf("BaseString::snprint Incorrect value in output buffer: " printf("BaseString::snprint Incorrect value in output buffer: "
"%d %d %d %d %d\n", "size=%d returned=expected=%d at pos=%d result=%d != expected=%d\n",
buf_sz, result, ret, buf[ret], fmt[ret]); buf_sz, result, ret, buf[ret], fmt[ret]);
return -1; return -1;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment