mirror of
https://github.com/ziglang/zig.git
synced 2025-12-10 00:03:10 +00:00
update format strings in os/windows/test.zig
This commit is contained in:
parent
83c4000319
commit
fc335a3a48
@ -30,7 +30,7 @@ fn testToPrefixedFileNoOracle(comptime path: []const u8, comptime expected_path:
|
|||||||
const expected_path_utf16 = std.unicode.utf8ToUtf16LeStringLiteral(expected_path);
|
const expected_path_utf16 = std.unicode.utf8ToUtf16LeStringLiteral(expected_path);
|
||||||
const actual_path = try windows.wToPrefixedFileW(null, path_utf16);
|
const actual_path = try windows.wToPrefixedFileW(null, path_utf16);
|
||||||
std.testing.expectEqualSlices(u16, expected_path_utf16, actual_path.span()) catch |e| {
|
std.testing.expectEqualSlices(u16, expected_path_utf16, actual_path.span()) catch |e| {
|
||||||
std.debug.print("got '{s}', expected '{s}'\n", .{ std.unicode.fmtUtf16Le(actual_path.span()), std.unicode.fmtUtf16Le(expected_path_utf16) });
|
std.debug.print("got '{f}', expected '{f}'\n", .{ std.unicode.fmtUtf16Le(actual_path.span()), std.unicode.fmtUtf16Le(expected_path_utf16) });
|
||||||
return e;
|
return e;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
@ -48,7 +48,7 @@ fn testToPrefixedFileOnlyOracle(comptime path: []const u8) !void {
|
|||||||
const zig_result = try windows.wToPrefixedFileW(null, path_utf16);
|
const zig_result = try windows.wToPrefixedFileW(null, path_utf16);
|
||||||
const win32_api_result = try RtlDosPathNameToNtPathName_U(path_utf16);
|
const win32_api_result = try RtlDosPathNameToNtPathName_U(path_utf16);
|
||||||
std.testing.expectEqualSlices(u16, win32_api_result.span(), zig_result.span()) catch |e| {
|
std.testing.expectEqualSlices(u16, win32_api_result.span(), zig_result.span()) catch |e| {
|
||||||
std.debug.print("got '{s}', expected '{s}'\n", .{ std.unicode.fmtUtf16Le(zig_result.span()), std.unicode.fmtUtf16Le(win32_api_result.span()) });
|
std.debug.print("got '{f}', expected '{f}'\n", .{ std.unicode.fmtUtf16Le(zig_result.span()), std.unicode.fmtUtf16Le(win32_api_result.span()) });
|
||||||
return e;
|
return e;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user