mirror of
https://github.com/ziglang/zig.git
synced 2024-11-26 23:22:44 +00:00
e3424332d3
* `doc/langref` formatting * upgrade `.{ .path = "..." }` to `b.path("...")` * avoid using arguments named `self` * make `Build.Step.Id` usage more consistent * add `Build.pathResolve` * use `pathJoin` and `pathResolve` everywhere * make sure `Build.LazyPath.getPath2` returns an absolute path
22 lines
423 B
Zig
22 lines
423 B
Zig
const expect = @import("std").testing.expect;
|
|
|
|
test "while loop continue expression" {
|
|
var i: usize = 0;
|
|
while (i < 10) : (i += 1) {}
|
|
try expect(i == 10);
|
|
}
|
|
|
|
test "while loop continue expression, more complicated" {
|
|
var i: usize = 1;
|
|
var j: usize = 1;
|
|
while (i * j < 2000) : ({
|
|
i *= 2;
|
|
j *= 3;
|
|
}) {
|
|
const my_ij = i * j;
|
|
try expect(my_ij < 2000);
|
|
}
|
|
}
|
|
|
|
// test
|