parser: port test "sentinel-terminated array type"

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

View File

@@ -1817,6 +1817,15 @@ test "zig fmt: c pointer type" {
);
}
test "zig fmt: sentinel-terminated array type" {
try testCanonical(
\\pub fn cStrToPrefixedFileW(s: [*:0]const u8) ![PATH_MAX_WIDE:0]u16 {
\\ return sliceToPrefixedFileW(mem.toSliceConst(u8, s));
\\}
\\
);
}
test "zig fmt: sentinel-terminated slice type" {
try testCanonical(
\\pub fn toSlice(self: Buffer) [:0]u8 {