aboutsummaryrefslogtreecommitdiff
path: root/doc/langref/test_while.zig
blob: 45b27bc7164e99bae32082e598809bfbb04c8dfa (plain)
1
2
3
4
5
6
7
8
9
10
11
const expect = @import("std").testing.expect;

test "while basic" {
    var i: usize = 0;
    while (i < 10) {
        i += 1;
    }
    try expect(i == 10);
}

// test