@@ -217,7 +217,7 @@ TEST_F(test, log_levels) {
217
217
expect_fflush_count = 1 ;
218
218
}
219
219
expected_message = " [" + helper_log_str (j) + " UMF] example log\n " ;
220
- helper_test_log ((util_log_level_t )j, " example log" );
220
+ helper_test_log ((util_log_level_t )j, " %s " , " example log" );
221
221
}
222
222
}
223
223
}
@@ -230,7 +230,7 @@ TEST_F(test, log_outputs) {
230
230
for (auto o : outs) {
231
231
loggerConfig = {0 , 0 , LOG_DEBUG, LOG_DEBUG, o};
232
232
expected_stream = o;
233
- helper_test_log (LOG_DEBUG, " example log" );
233
+ helper_test_log (LOG_DEBUG, " %s " , " example log" );
234
234
}
235
235
}
236
236
@@ -246,7 +246,7 @@ TEST_F(test, flush_levels) {
246
246
expect_fflush_count = 1 ;
247
247
}
248
248
expected_message = " [" + helper_log_str (j) + " UMF] example log\n " ;
249
- helper_test_log ((util_log_level_t )j, " example log" );
249
+ helper_test_log ((util_log_level_t )j, " %s " , " example log" );
250
250
}
251
251
}
252
252
}
@@ -256,10 +256,10 @@ TEST_F(test, long_log) {
256
256
expect_fflush_count = 1 ;
257
257
loggerConfig = {0 , 0 , LOG_DEBUG, LOG_DEBUG, stderr};
258
258
expected_message = " [DEBUG UMF] " + std::string (8191 , ' x' ) + " \n " ;
259
- helper_test_log (LOG_DEBUG, std::string (8191 , ' x' ).c_str ());
259
+ helper_test_log (LOG_DEBUG, " %s " , std::string (8191 , ' x' ).c_str ());
260
260
expected_message =
261
261
" [DEBUG UMF] " + std::string (8191 , ' x' ) + " [truncated...]\n " ;
262
- helper_test_log (LOG_DEBUG, + std::string (8192 , ' x' ).c_str ());
262
+ helper_test_log (LOG_DEBUG, " %s " , std::string (8192 , ' x' ).c_str ());
263
263
}
264
264
265
265
TEST_F (test, timestamp_log) {
@@ -269,7 +269,7 @@ TEST_F(test, timestamp_log) {
269
269
// TODO: for now we do not check output message,
270
270
// as it requires more sophisticated message validation (a.k.a regrex)
271
271
expected_message = " " ;
272
- helper_test_log (LOG_DEBUG, " example log" );
272
+ helper_test_log (LOG_DEBUG, " %s " , " example log" );
273
273
}
274
274
275
275
TEST_F (test, pid_log) {
@@ -279,7 +279,7 @@ TEST_F(test, pid_log) {
279
279
// TODO: for now we do not check output message,
280
280
// as it requires more sophisticated message validation (a.k.a regrex)
281
281
expected_message = " " ;
282
- helper_test_log (LOG_DEBUG, " example log" );
282
+ helper_test_log (LOG_DEBUG, " %s " , " example log" );
283
283
}
284
284
285
285
TEST_F (test, log_macros) {
0 commit comments