Sha256: 2da5583258d8519175912c343f668cab34c45a637113aad45b5e57422acab805
Contents?: true
Size: 1.23 KB
Versions: 229
Compression:
Stored size: 1.23 KB
Contents
{-# OPTIONS_GHC -fno-warn-type-defaults #-} import Data.Foldable (for_) import Test.Hspec (Spec, describe, it, shouldBe) import Test.Hspec.Runner (configFastFail, defaultConfig, hspecWith) import Raindrops (convert) main :: IO () main = hspecWith defaultConfig {configFastFail = True} specs specs :: Spec specs = describe "convert" $ for_ cases test where test (number, expected) = it description assertion where description = show number assertion = convert number `shouldBe` expected cases = [ ( 1, "1" ) , ( 3, "Pling" ) , ( 5, "Plang" ) , ( 7, "Plong" ) , ( 6, "Pling" ) , ( 8, "8" ) , ( 9, "Pling" ) , ( 10, "Plang" ) , ( 14, "Plong" ) , ( 15, "PlingPlang" ) , ( 21, "PlingPlong" ) , ( 25, "Plang" ) , ( 27, "Pling" ) , ( 35, "PlangPlong" ) , ( 49, "Plong" ) , ( 52, "52" ) , ( 105, "PlingPlangPlong") , (3125, "Plang" ) ]
Version data entries
229 entries across 229 versions & 1 rubygems