| 1 | const std = @import("std"); |
| 2 | const expectEqualStrings = std.testing.expectEqualStrings; |
| 3 | const mem = std.mem; |
| 4 | |
| 5 | test "cast *[1][*:0]const u8 to []const ?[*:0]const u8" { |
| 6 | const window_name = [1][*:0]const u8{"window name"}; |
| 7 | const x: []const ?[*:0]const u8 = &window_name; |
| 8 | try expectEqualStrings("window name", mem.span(x[0].?)); |
| 9 | } |
| 10 | |
| 11 | // test |