parser: port test "sentinel-terminated slice type"

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-02-10 15:06:28 +00:00
parent 592638502a
commit 83c463f6a7

View File

@@ -1817,6 +1817,15 @@ test "zig fmt: c pointer type" {
);
}
test "zig fmt: sentinel-terminated slice type" {
try testCanonical(
\\pub fn toSlice(self: Buffer) [:0]u8 {
\\ return self.list.toSlice()[0..self.len()];
\\}
\\
);
}
test "zig fmt: top-level tuple function call type" {
try testCanonical(
\\foo()