mirror of
https://github.com/ziglang/zig.git
synced 2026-02-20 16:24:51 +00:00
uncomment a now-passing behavior test
This commit is contained in:
parent
1e4bae6692
commit
e54c49be9b
@ -240,19 +240,18 @@ fn testCastConstArrayRefToConstSlice() void {
|
||||
}
|
||||
|
||||
test "peer type resolution: error and [N]T" {
|
||||
// TODO: implicit error!T to error!U where T can implicitly cast to U
|
||||
//expect(mem.eql(u8, try testPeerErrorAndArray(0), "OK"));
|
||||
//comptime expect(mem.eql(u8, try testPeerErrorAndArray(0), "OK"));
|
||||
expect(mem.eql(u8, try testPeerErrorAndArray(0), "OK"));
|
||||
comptime expect(mem.eql(u8, try testPeerErrorAndArray(0), "OK"));
|
||||
expect(mem.eql(u8, try testPeerErrorAndArray2(1), "OKK"));
|
||||
comptime expect(mem.eql(u8, try testPeerErrorAndArray2(1), "OKK"));
|
||||
}
|
||||
|
||||
//fn testPeerErrorAndArray(x: u8) error![]const u8 {
|
||||
// return switch (x) {
|
||||
// 0x00 => "OK",
|
||||
// else => error.BadValue,
|
||||
// };
|
||||
//}
|
||||
fn testPeerErrorAndArray(x: u8) anyerror![]const u8 {
|
||||
return switch (x) {
|
||||
0x00 => "OK",
|
||||
else => error.BadValue,
|
||||
};
|
||||
}
|
||||
fn testPeerErrorAndArray2(x: u8) anyerror![]const u8 {
|
||||
return switch (x) {
|
||||
0x00 => "OK",
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user