Skip to content

Commit 5796ff6

Browse files
committed
Update snippets test to test no column
1 parent 9ac5a18 commit 5796ff6

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

test/unit/lib/formatting.cpp

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,7 @@ TEST(FormatterTest, Snippets) {
273273
cpptrace::stacktrace trace;
274274
unsigned line = __LINE__ + 1;
275275
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});
277277
auto formatter = cpptrace::formatter{}
278278
.snippets(true);
279279
auto res = split(formatter.format(trace), "\n");
@@ -291,12 +291,12 @@ TEST(FormatterTest, Snippets) {
291291
),
292292
cpptrace::microfmt::format(" ^"),
293293
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});",
295295
line + 1
296296
),
297297
cpptrace::microfmt::format(" {}: auto formatter = cpptrace::formatter{{}}", line + 2),
298298
// 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),
300300
cpptrace::microfmt::format(" {}: unsigned line = __LINE__ + 1;", line - 1),
301301
cpptrace::microfmt::format(
302302
" {}: trace.frames.push_back({0x1, 0x1001, {line}, {{20}}, __FILE__, \"foo()\", false});",
@@ -306,7 +306,6 @@ TEST(FormatterTest, Snippets) {
306306
" > {}: trace.frames.push_back({0x2, 0x1002, {line + 1}, {{20}}, __FILE__, \"foo()\", false});",
307307
line + 1
308308
),
309-
cpptrace::microfmt::format(" ^"),
310309
cpptrace::microfmt::format(" {}: auto formatter = cpptrace::formatter{{}}", line + 2),
311310
cpptrace::microfmt::format(" {}: .snippets(true);", line + 3)
312311
)
@@ -330,16 +329,15 @@ TEST(FormatterTest, Snippets) {
330329
line + 1
331330
),
332331
// 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),
334333
cpptrace::microfmt::format(
335334
" {}: trace.frames.push_back({0x1, 0x1001, {line}, {{20}}, __FILE__, \"foo()\", false});",
336335
line
337336
),
338337
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});",
340339
line + 1
341340
),
342-
cpptrace::microfmt::format(" ^"),
343341
cpptrace::microfmt::format(" {}: auto formatter = cpptrace::formatter{{}}", line + 2)
344342
)
345343
);

0 commit comments

Comments
 (0)