mirror of
https://github.com/ziglang/zig.git
synced 2024-11-27 07:32:44 +00:00
14 lines
207 B
Zig
14 lines
207 B
Zig
const expect = @import("std").testing.expect;
|
|
|
|
test "while break" {
|
|
var i: usize = 0;
|
|
while (true) {
|
|
if (i == 10)
|
|
break;
|
|
i += 1;
|
|
}
|
|
try expect(i == 10);
|
|
}
|
|
|
|
// test
|