uncomment a now-passing behavior test

This commit is contained in:
Andrew Kelley 2019-12-12 19:45:33 -05:00
parent 1e4bae6692
commit e54c49be9b
No known key found for this signature in database
GPG Key ID: 7C5F548F728501A9

View File

@ -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",