diff --git a/roman-numerals.md b/roman-numerals.md index e82a9f1e..4e6842ad 100644 --- a/roman-numerals.md +++ b/roman-numerals.md @@ -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). +> +>
+> Click here to see why (Technical Explanation) +> +> 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. +>
+ ```go func TestPropertiesOfConversion(t *testing.T) { assertion := func(arabic int) bool {