-
Notifications
You must be signed in to change notification settings - Fork 92
Fix signum implementation #280
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 7 commits
95741d1
80447ea
64119e5
478203e
afa818b
bab0a84
c9c20b0
c042347
ab1a78a
047c8a3
c85d8eb
2c8a023
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2,7 +2,7 @@ module Test.Main where | |
|
|
||
| import Prelude | ||
| import Data.HeytingAlgebra (ff, tt, implies) | ||
| import Data.Ord (abs) | ||
| import Data.Ord (abs, signum) | ||
| import Test.Data.Generic.Rep (testGenericRep) | ||
| import Test.Utils (AlmostEff, assert) | ||
|
|
||
|
|
@@ -15,6 +15,7 @@ main = do | |
| testIntDegree | ||
| testRecordInstances | ||
| testGenericRep | ||
| testSignum | ||
|
|
||
| foreign import testNumberShow :: (Number -> String) -> AlmostEff | ||
|
|
||
|
|
@@ -151,3 +152,8 @@ testRecordInstances = do | |
| assert "Record top" $ | ||
| (top :: { a :: Boolean }).a | ||
| == top | ||
|
|
||
| testSignum :: AlmostEff | ||
| testSignum = do | ||
| assert "signum positive zero" $ signum 0.0 == 0.0 | ||
| assert "signum negative zero" $ signum (-0.0) == (-0.0) | ||
|
||
Uh oh!
There was an error while loading. Please reload this page.