| ... | @@ -587,4 +587,7 @@ fn unreachableFree( | ... | @@ -587,4 +587,7 @@ fn unreachableFree( |
| 587 | test failing { | 587 | test failing { |
| 588 | const f: Allocator = .failing; | 588 | const f: Allocator = .failing; |
| 589 | try std.testing.expectError(error.OutOfMemory, f.alloc(u8, 123)); | 589 | try std.testing.expectError(error.OutOfMemory, f.alloc(u8, 123)); |
| | 590 | // Expect very large allocations to fail at the implementation level and not in the interface |
| | 591 | try std.testing.expectError(error.OutOfMemory, f.alloc(u8, std.math.maxInt(usize))); |
| | 592 | try std.testing.expectError(error.OutOfMemory, f.allocSentinel(u8, std.math.maxInt(usize) - 1, 0)); |
| 590 | } | 593 | } |