aboutsummaryrefslogtreecommitdiff
path: root/src/test/DUtilUnitTest/StrUtilTest.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/DUtilUnitTest/StrUtilTest.cpp')
-rw-r--r--src/test/DUtilUnitTest/StrUtilTest.cpp16
1 files changed, 12 insertions, 4 deletions
diff --git a/src/test/DUtilUnitTest/StrUtilTest.cpp b/src/test/DUtilUnitTest/StrUtilTest.cpp
index 7c35b7c0..94fee280 100644
--- a/src/test/DUtilUnitTest/StrUtilTest.cpp
+++ b/src/test/DUtilUnitTest/StrUtilTest.cpp
@@ -86,6 +86,8 @@ namespace DutilTests
86 HRESULT hr = S_OK; 86 HRESULT hr = S_OK;
87 LPWSTR sczOutput = NULL; 87 LPWSTR sczOutput = NULL;
88 88
89 DutilInitialize(&DutilTestTraceError);
90
89 try 91 try
90 { 92 {
91 hr = StrTrimWhitespace(&sczOutput, wzInput); 93 hr = StrTrimWhitespace(&sczOutput, wzInput);
@@ -103,7 +105,7 @@ namespace DutilTests
103 } 105 }
104 106
105 LExit: 107 LExit:
106 return; 108 DutilUninitialize();
107 } 109 }
108 110
109 void TestTrimAnsi(LPCSTR szInput, LPCSTR szExpectedResult) 111 void TestTrimAnsi(LPCSTR szInput, LPCSTR szExpectedResult)
@@ -111,6 +113,8 @@ namespace DutilTests
111 HRESULT hr = S_OK; 113 HRESULT hr = S_OK;
112 LPSTR sczOutput = NULL; 114 LPSTR sczOutput = NULL;
113 115
116 DutilInitialize(&DutilTestTraceError);
117
114 try 118 try
115 { 119 {
116 hr = StrAnsiTrimWhitespace(&sczOutput, szInput); 120 hr = StrAnsiTrimWhitespace(&sczOutput, szInput);
@@ -128,7 +132,7 @@ namespace DutilTests
128 } 132 }
129 133
130 LExit: 134 LExit:
131 return; 135 DutilUninitialize();
132 } 136 }
133 137
134 void TestStrAllocStringAnsi(LPCSTR szSource, DWORD cchSource, LPCWSTR wzExpectedResult) 138 void TestStrAllocStringAnsi(LPCSTR szSource, DWORD cchSource, LPCWSTR wzExpectedResult)
@@ -136,6 +140,8 @@ namespace DutilTests
136 HRESULT hr = S_OK; 140 HRESULT hr = S_OK;
137 LPWSTR sczOutput = NULL; 141 LPWSTR sczOutput = NULL;
138 142
143 DutilInitialize(&DutilTestTraceError);
144
139 try 145 try
140 { 146 {
141 hr = StrAllocStringAnsi(&sczOutput, szSource, cchSource, CP_UTF8); 147 hr = StrAllocStringAnsi(&sczOutput, szSource, cchSource, CP_UTF8);
@@ -153,7 +159,7 @@ namespace DutilTests
153 } 159 }
154 160
155 LExit: 161 LExit:
156 return; 162 DutilUninitialize();
157 } 163 }
158 164
159 void TestStrAnsiAllocString(LPWSTR wzSource, DWORD cchSource, LPCSTR szExpectedResult) 165 void TestStrAnsiAllocString(LPWSTR wzSource, DWORD cchSource, LPCSTR szExpectedResult)
@@ -161,6 +167,8 @@ namespace DutilTests
161 HRESULT hr = S_OK; 167 HRESULT hr = S_OK;
162 LPSTR sczOutput = NULL; 168 LPSTR sczOutput = NULL;
163 169
170 DutilInitialize(&DutilTestTraceError);
171
164 try 172 try
165 { 173 {
166 hr = StrAnsiAllocString(&sczOutput, wzSource, cchSource, CP_UTF8); 174 hr = StrAnsiAllocString(&sczOutput, wzSource, cchSource, CP_UTF8);
@@ -178,7 +186,7 @@ namespace DutilTests
178 } 186 }
179 187
180 LExit: 188 LExit:
181 return; 189 DutilUninitialize();
182 } 190 }
183 }; 191 };
184} 192}