Skip to content

Commit 46b039c

Browse files
committed
Fix Unicode builds after recent test cases related changes.
1 parent 24e0d13 commit 46b039c

File tree

3 files changed

+12
-11
lines changed

3 files changed

+12
-11
lines changed

tests/appender_test/main.cxx

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -116,8 +116,8 @@ main()
116116
// Test appender's error handling for wrong layout.
117117

118118
{
119-
std::istringstream propsStream (
120-
"layout=log4cplus::WrongLayout");
119+
tistringstream propsStream (
120+
LOG4CPLUS_TEXT ("layout=log4cplus::WrongLayout"));
121121
Properties props (propsStream);
122122
SharedObjectPtr<Appender> append (
123123
new ConsoleAppender (props));
@@ -127,8 +127,8 @@ main()
127127
// Test threshold parsing.
128128

129129
{
130-
std::istringstream propsStream (
131-
"Threshold=ERROR");
130+
tistringstream propsStream (
131+
LOG4CPLUS_TEXT ("Threshold=ERROR"));
132132
Properties props (propsStream);
133133
SharedObjectPtr<Appender> append (
134134
new ConsoleAppender (props));
@@ -138,8 +138,8 @@ main()
138138
// Test threshold parsing of wrong log level.
139139

140140
{
141-
std::istringstream propsStream (
142-
"Threshold=WRONG");
141+
tistringstream propsStream (
142+
LOG4CPLUS_TEXT ("Threshold=WRONG"));
143143
Properties props (propsStream);
144144
SharedObjectPtr<Appender> append (
145145
new ConsoleAppender (props));
@@ -149,8 +149,8 @@ main()
149149
// Test wrong filter parsing.
150150

151151
{
152-
std::istringstream propsStream (
153-
"filters.1=log4cplus::spi::WrongFilter");
152+
tistringstream propsStream (
153+
LOG4CPLUS_TEXT ("filters.1=log4cplus::spi::WrongFilter"));
154154
Properties props (propsStream);
155155
SharedObjectPtr<Appender> append (
156156
new ConsoleAppender (props));

tests/fileappender_test/main.cxx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,14 +35,15 @@ main()
3535
}
3636

3737
{
38-
std::istringstream propsStream ("File=");
38+
tistringstream propsStream (LOG4CPLUS_TEXT ("File="));
3939
helpers::Properties props (propsStream);
4040
FileAppender appender (props);
4141
appender.setName (LOG4CPLUS_TEXT ("Second"));
4242
}
4343

4444
{
45-
std::istringstream propsStream ("File=nonexistent/Test.log");
45+
tistringstream propsStream (
46+
LOG4CPLUS_TEXT("File=nonexistent/Test.log"));
4647
helpers::Properties props (propsStream);
4748
FileAppender appender (props);
4849
appender.setName (LOG4CPLUS_TEXT ("Third"));

tests/propertyconfig_test/main.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ main()
3333

3434
#define TEST_TEXT LOG4CPLUS_TEXT ("this is a test with DOS EOL-->")
3535
tistringstream propsStream (
36-
"text=" TEST_TEXT "\r\n");
36+
LOG4CPLUS_TEXT ("text=") TEST_TEXT LOG4CPLUS_TEXT ("\r\n"));
3737
Properties props (propsStream);
3838
if (props.getProperty (LOG4CPLUS_TEXT ("text")) != TEST_TEXT)
3939
LOG4CPLUS_ERROR (root, LOG4CPLUS_TEXT ("DOS EOLs test has failed"));

0 commit comments

Comments
 (0)