Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mariadb
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
09ee9734
Commit
09ee9734
authored
Nov 11, 2004
by
tomas@poseidon.ndb.mysql.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ndb_test_platform.cpp:
better printouts in ndb_test_platform
parent
37d1b4ec
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
4 deletions
+6
-4
ndb/tools/ndb_test_platform.cpp
ndb/tools/ndb_test_platform.cpp
+6
-4
No files found.
ndb/tools/ndb_test_platform.cpp
View file @
09ee9734
...
@@ -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
;
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment