Skip to content

Commit

Permalink
Convert CFString without using std::basic_string<UniCode>
Browse files Browse the repository at this point in the history
  • Loading branch information
stephen-webb committed Aug 1, 2023
1 parent 8df2f2f commit 2510c16
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion src/test/cpp/helpers/messagebuffertest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,18 @@ LOGUNIT_CLASS(MessageBufferTest)
LOGUNIT_ASSERT_EQUAL(std::basic_string<log4cxx::UniChar>(greeting), buf.str(retval));
LOGUNIT_ASSERT_EQUAL(false, buf.hasStream());
}

#elif LOG4CXX_CFSTRING_API
void testInsertCFString()
{
MessageBuffer buf;
const log4cxx::logchar greeting[] = { 'H', 'e', 'l', 'l', 'o',
',', ' ', 'W', 'o', 'r', 'l', 'd', 0
};
CharMessageBuffer& retval = buf << CFSTR("Hello")
<< CFSTR(", World");
LOGUNIT_ASSERT_EQUAL(std::basic_string<log4cxx::logchar>(greeting), buf.str(retval));
LOGUNIT_ASSERT_EQUAL(false, buf.hasStream());
}
#endif

};
Expand Down

0 comments on commit 2510c16

Please sign in to comment.