aboutsummaryrefslogtreecommitdiff
path: root/doc/langref/test_print_too_many_args.zig
blob: ac18704bd02101822a3e81baa9672eab29da45ac (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
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: {}