@@ -220,7 +220,7 @@ TEST_F(test, log_levels) {
220
220
expect_fflush_count = 1 ;
221
221
}
222
222
expected_message = " [" + helper_log_str (j) + " UMF] example log\n " ;
223
- helper_test_log ((util_log_level_t )j, " example log" );
223
+ helper_test_log ((util_log_level_t )j, " %s " , " example log" );
224
224
}
225
225
}
226
226
}
@@ -233,7 +233,7 @@ TEST_F(test, log_outputs) {
233
233
for (auto o : outs) {
234
234
loggerConfig = {0 , 0 , LOG_DEBUG, LOG_DEBUG, o};
235
235
expected_stream = o;
236
- helper_test_log (LOG_DEBUG, " example log" );
236
+ helper_test_log (LOG_DEBUG, " %s " , " example log" );
237
237
}
238
238
}
239
239
@@ -249,7 +249,7 @@ TEST_F(test, flush_levels) {
249
249
expect_fflush_count = 1 ;
250
250
}
251
251
expected_message = " [" + helper_log_str (j) + " UMF] example log\n " ;
252
- helper_test_log ((util_log_level_t )j, " example log" );
252
+ helper_test_log ((util_log_level_t )j, " %s " , " example log" );
253
253
}
254
254
}
255
255
}
@@ -259,10 +259,10 @@ TEST_F(test, long_log) {
259
259
expect_fflush_count = 1 ;
260
260
loggerConfig = {0 , 0 , LOG_DEBUG, LOG_DEBUG, stderr};
261
261
expected_message = " [DEBUG UMF] " + std::string (8191 , ' x' ) + " \n " ;
262
- helper_test_log (LOG_DEBUG, std::string (8191 , ' x' ).c_str ());
262
+ helper_test_log (LOG_DEBUG, " %s " , std::string (8191 , ' x' ).c_str ());
263
263
expected_message =
264
264
" [DEBUG UMF] " + std::string (8191 , ' x' ) + " [truncated...]\n " ;
265
- helper_test_log (LOG_DEBUG, + std::string (8192 , ' x' ).c_str ());
265
+ helper_test_log (LOG_DEBUG, " %s " , std::string (8192 , ' x' ).c_str ());
266
266
}
267
267
268
268
TEST_F (test, timestamp_log) {
@@ -272,7 +272,7 @@ TEST_F(test, timestamp_log) {
272
272
// TODO: for now we do not check output message,
273
273
// as it requires more sophisticated message validation (a.k.a regrex)
274
274
expected_message = " " ;
275
- helper_test_log (LOG_DEBUG, " example log" );
275
+ helper_test_log (LOG_DEBUG, " %s " , " example log" );
276
276
}
277
277
278
278
TEST_F (test, pid_log) {
@@ -282,7 +282,7 @@ TEST_F(test, pid_log) {
282
282
// TODO: for now we do not check output message,
283
283
// as it requires more sophisticated message validation (a.k.a regrex)
284
284
expected_message = " " ;
285
- helper_test_log (LOG_DEBUG, " example log" );
285
+ helper_test_log (LOG_DEBUG, " %s " , " example log" );
286
286
}
287
287
288
288
TEST_F (test, log_macros) {
0 commit comments