Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions roman-numerals.md
Original file line number Diff line number Diff line change
Expand Up @@ -687,6 +687,16 @@ Property based tests help you do this by throwing random data at your code and v

Enough words, let's see some code

> **⚠️ Linux Users:** Please **DO NOT** run the test below immediately. It will likely freeze your system (requiring a hard reboot).
>
> <details>
> <summary>Click here to see why (Technical Explanation)</summary>
>
> The `testing/quick` package generates random integers up to `int64` max. Our current naive implementation attempts to build a string of that length in memory (quadrillions of characters).
>
> While macOS and Windows often handle this gracefully (UI remains responsive), Linux kernels usually encounter "swap thrashing," causing the entire system to freeze before the process can be killed.
> </details>

```go
func TestPropertiesOfConversion(t *testing.T) {
assertion := func(arabic int) bool {
Expand Down