Skip to content

Commit

Permalink
Refine testing ACE_Auto_String_Free::operator bool
Browse files Browse the repository at this point in the history
  • Loading branch information
likema committed Jul 28, 2024
1 parent 725e4de commit 0b917f2
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion ACE/tests/SString_Test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -154,9 +154,19 @@ int testAutoStringFree()
{
char* s = ACE_OS::strdup("Hello, World");
const ACE_Auto_String_Free s1(s);
if (s1)
{
}
else
{
ACE_ERROR_RETURN ((LM_ERROR,
ACE_TEXT ("ACE_Auto_String_Free::operator bool return false")),
1);
}

if (!s1)
ACE_ERROR_RETURN ((LM_ERROR,
ACE_TEXT ("ACE_Auto_String_Free is nullptr")),
ACE_TEXT ("!ACE_Auto_String_Free::operator bool return true")),
1);

return 0;
Expand Down

0 comments on commit 0b917f2

Please sign in to comment.