diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2025-07-11 16:05:30 -0400 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2025-07-11 16:05:30 -0400 |
| commit | 46b0dbc5a448249ddc9a6ce20465f0fa41de6d64 (patch) | |
| tree | a353513c1fdb95baa2d225fa50972be3c9d11d4e /test/integers.tm | |
| parent | 4834f3355d3b0355cb6ff7774d18e86ca0f5e38e (diff) | |
Use `assert` more in tests to give better error messages
Diffstat (limited to 'test/integers.tm')
| -rw-r--r-- | test/integers.tm | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/test/integers.tm b/test/integers.tm index 3035ad3b..ee560952 100644 --- a/test/integers.tm +++ b/test/integers.tm @@ -85,8 +85,7 @@ func main() interesting_denominators := [-99, -20, -17, -1, 1, 17, 20, 99] for n in interesting_numerators for d in interesting_denominators - >> (n/d)*d + (n mod d) == n - = yes + assert (n/d)*d + (n mod d) == n >> (0).next_prime() = 2 @@ -94,7 +93,7 @@ func main() = 11 #>> (11).prev_prime() #= 7 - >> (and: p.is_prime() for p in [ + assert (and: p.is_prime() for p in [ 2, 3, 5, 7, 137372146048179869781170214707, 811418847921670560768224995279, @@ -107,7 +106,6 @@ func main() 121475876690852432982324195553, 771958616175795150904761471637, ])! - = yes >> (or: p.is_prime() for p in [ -1, 0, 1, 4, 6, |
