2024-04-24 17:41:47 -07:00
|
|
|
const std = @import("std");
|
|
|
|
|
const expect = std.testing.expect;
|
|
|
|
|
const mem = std.mem;
|
|
|
|
|
|
2024-07-29 03:31:18 -07:00
|
|
|
test "cast *[1][*:0]const u8 to []const ?[*:0]const u8" {
|
|
|
|
|
const window_name = [1][*:0]const u8{"window name"};
|
|
|
|
|
const x: []const ?[*:0]const u8 = &window_name;
|
|
|
|
|
try expect(mem.eql(u8, mem.span(x[0].?), "window name"));
|
2024-04-24 17:41:47 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// test
|