zig/doc/langref/test_print_too_many_args.zig

15 lines
340 B
Zig

const print = @import("std").debug.print;
const a_number: i32 = 1234;
const a_string = "foobar";
test "print too many arguments" {
print("here is a string: '{s}' here is a number: {}\n", .{
a_string,
a_number,
a_number,
});
}
// test_error=unused argument in 'here is a string: '{s}' here is a number: {}