forked from schmittlauch/Hash2Pub
parent
04b3a1f8b4
commit
bfde27cea6
|
@ -106,6 +106,7 @@ test-suite Hash2Pub-test
|
|||
hs-source-dirs: test
|
||||
|
||||
-- The entrypoint to the test suite.
|
||||
main-is: MyLibTest.hs
|
||||
main-is: Specs.hs
|
||||
other-modules: FediChordSpec
|
||||
build-depends: hspec, Hash2Pub
|
||||
|
||||
|
|
|
@ -1,13 +0,0 @@
|
|||
module Main (main) where
|
||||
|
||||
import Test.Hspec
|
||||
|
||||
import Hash2Pub.FediChord
|
||||
|
||||
main :: IO ()
|
||||
main = hspec $ do
|
||||
describe "NodeID" $ do
|
||||
it "can store a numeral ID" $ do
|
||||
getNodeID (mkNodeID 2342) `shouldBe` 2342
|
||||
it "computes ID values within the modular bounds" $ do
|
||||
getNodeID ((maxBound :: NodeID) + mkNodeID 2) < getNodeID (maxBound :: NodeID) `shouldBe` True
|
8
Hash2Pub/test/Specs.hs
Normal file
8
Hash2Pub/test/Specs.hs
Normal file
|
@ -0,0 +1,8 @@
|
|||
module Main (main) where
|
||||
|
||||
import Test.Hspec
|
||||
import qualified FediChordSpec
|
||||
|
||||
main :: IO ()
|
||||
main = hspec $ do
|
||||
describe "FediChord tests" FediChordSpec.spec
|
Loading…
Reference in a new issue