"{q}" prints strings nicely but what about a single character?
Ziggit
"{q}" prints strings nicely but what about a single character?
test "print u8 with {q}" { const expected: u8 = 'a'; const actual: u8 = '\t'; // this does not compile // errdefer std.debug.print("expected {q}, found {q}\n", .{ // expected, // actual, // }); // this does not escape control characters errdefer std.debug.print("expected '{c}', found '{c}'\n", .{ expected, actual, }); // this prints double quotes instead of single quotes errdefer std.debug.print("expected {q}, found {q}\n...
test "print u8 with {q}" { const expected: u8 = 'a'; const actual: u8 = '\t'; // this does not compile // errdefer std.debug.print("expected {q}, found {q}\n", .{ // expected, //…
0 comments
No comments yet.