@@ -273,7 +273,7 @@ TEST(FormatterTest, Snippets) {
273
273
cpptrace::stacktrace trace;
274
274
unsigned line = __LINE__ + 1 ;
275
275
trace.frames .push_back ({0x1 , 0x1001 , {line}, {20 }, __FILE__, " foo()" , false });
276
- trace.frames .push_back ({0x2 , 0x1002 , {line + 1 }, {20 }, __FILE__, " foo()" , false });
276
+ trace.frames .push_back ({0x2 , 0x1002 , {line + 1 }, {}, __FILE__, " foo()" , false });
277
277
auto formatter = cpptrace::formatter{}
278
278
.snippets (true );
279
279
auto res = split (formatter.format (trace), " \n " );
@@ -291,12 +291,12 @@ TEST(FormatterTest, Snippets) {
291
291
),
292
292
cpptrace::microfmt::format (" ^" ),
293
293
cpptrace::microfmt::format (
294
- " {}: trace.frames.push_back({0x2, 0x1002, {line + 1}, {{20 }}, __FILE__, \" foo()\" , false});" ,
294
+ " {}: trace.frames.push_back({0x2, 0x1002, {line + 1}, {{}}, __FILE__, \" foo()\" , false});" ,
295
295
line + 1
296
296
),
297
297
cpptrace::microfmt::format (" {}: auto formatter = cpptrace::formatter{{}}" , line + 2 ),
298
298
// frame 2
299
- cpptrace::microfmt::format (" #1 0x" ADDR_PREFIX " 00000002 in foo() at {}:{}:20 " , __FILE__, line + 1 ),
299
+ cpptrace::microfmt::format (" #1 0x" ADDR_PREFIX " 00000002 in foo() at {}:{}" , __FILE__, line + 1 ),
300
300
cpptrace::microfmt::format (" {}: unsigned line = __LINE__ + 1;" , line - 1 ),
301
301
cpptrace::microfmt::format (
302
302
" {}: trace.frames.push_back({0x1, 0x1001, {line}, {{20}}, __FILE__, \" foo()\" , false});" ,
@@ -306,7 +306,6 @@ TEST(FormatterTest, Snippets) {
306
306
" > {}: trace.frames.push_back({0x2, 0x1002, {line + 1}, {{20}}, __FILE__, \" foo()\" , false});" ,
307
307
line + 1
308
308
),
309
- cpptrace::microfmt::format (" ^" ),
310
309
cpptrace::microfmt::format (" {}: auto formatter = cpptrace::formatter{{}}" , line + 2 ),
311
310
cpptrace::microfmt::format (" {}: .snippets(true);" , line + 3 )
312
311
)
@@ -330,16 +329,15 @@ TEST(FormatterTest, Snippets) {
330
329
line + 1
331
330
),
332
331
// frame 2
333
- cpptrace::microfmt::format (" #1 0x" ADDR_PREFIX " 00000002 in foo() at {}:{}:20 " , __FILE__, line + 1 ),
332
+ cpptrace::microfmt::format (" #1 0x" ADDR_PREFIX " 00000002 in foo() at {}:{}" , __FILE__, line + 1 ),
334
333
cpptrace::microfmt::format (
335
334
" {}: trace.frames.push_back({0x1, 0x1001, {line}, {{20}}, __FILE__, \" foo()\" , false});" ,
336
335
line
337
336
),
338
337
cpptrace::microfmt::format (
339
- " > {}: trace.frames.push_back({0x2, 0x1002, {line + 1}, {{20 }}, __FILE__, \" foo()\" , false});" ,
338
+ " > {}: trace.frames.push_back({0x2, 0x1002, {line + 1}, {{}}, __FILE__, \" foo()\" , false});" ,
340
339
line + 1
341
340
),
342
- cpptrace::microfmt::format (" ^" ),
343
341
cpptrace::microfmt::format (" {}: auto formatter = cpptrace::formatter{{}}" , line + 2 )
344
342
)
345
343
);
0 commit comments