diff options
| author | Bruce Hill <bitbucket@bruce-hill.com> | 2018-07-18 01:27:56 -0700 |
|---|---|---|
| committer | Bruce Hill <bitbucket@bruce-hill.com> | 2018-07-18 01:28:17 -0700 |
| commit | d5cfaa37be9e278c44a25ef448a071390597306e (patch) | |
| tree | 7fbe78b5153bb9c761c283533943ab80da3a1844 /tests/math.nom | |
| parent | c7c657d38f999901225b33482ef3a15994526feb (diff) | |
Upgrading to version 2.3 (main change: "=" instead of "<-" for
assignment)
Diffstat (limited to 'tests/math.nom')
| -rw-r--r-- | tests/math.nom | 26 |
1 files changed, 12 insertions, 14 deletions
diff --git a/tests/math.nom b/tests/math.nom index 3764dee..7ddefba 100644 --- a/tests/math.nom +++ b/tests/math.nom @@ -1,22 +1,20 @@ -#!/usr/bin/env nomsu -V1 +#!/usr/bin/env nomsu -V2.3.4.3 #.. Tests for the stuff defined in core/control_flow.nom - use "core" - assume (all of [inf, pi, tau, golden ratio, e]) or barf "math constants failed" -%nan <- (NaN) +%nan = (NaN) assume (%nan != %nan) or barf "NaN failed" -assume (("5" as a number) = 5) -assume +assume (("5" as a number) == 5) +assume (..) all of [..] - abs 5, |5|, sqrt 5, √(5), sine 5, cosine 5, tangent 5, arc sine 5, arc cosine 5, - arc tangent 5, arc tangent 5/10, hyperbolic sine 5, hyperbolic cosine 5, - hyperbolic tangent 5, e^5, ln 5, log base 2 of 5, floor 5, ceiling 5, round 5, + abs 5, | 5 |, sqrt 5, √ 5, sine 5, cosine 5, tangent 5, arc sine 5, arc cosine 5 + arc tangent 5, arc tangent 5 / 10, hyperbolic sine 5, hyperbolic cosine 5 + hyperbolic tangent 5, e^ 5, ln 5, log base 2 of 5, floor 5, ceiling 5, round 5 ..or barf "math functions failed" -assume ((463 to the nearest 100) = 500) or barf "rounding failed" -assume ((2.6 to the nearest 0.25) = 2.5) or barf "rounding failed" -assume ((min of [3,-4,1,2] by % = (%*%)) = 1) -assume ((max of [3,-4,1,2] by % = (%*%)) = -4) -say "Math test passed" +assume ((463 to the nearest 100) == 500) or barf "rounding failed" +assume ((2.6 to the nearest 0.25) == 2.5) or barf "rounding failed" +assume ((min of [3, -4, 1, 2] by % = (% * %)) == 1) +assume ((max of [3, -4, 1, 2] by % = (% * %)) == -4) +say "Math test passed"
\ No newline at end of file |
