Sha256: 992d0841b1f8ec00219e9599d9e674da43575260f20b5651e49858eef2234de3
Contents?: true
Size: 907 Bytes
Versions: 165
Compression:
Stored size: 907 Bytes
Contents
import Test.Hspec (Spec, describe, it) import Test.Hspec.Runner (configFastFail, defaultConfig, hspecWith) import Test.QuickCheck (Positive(Positive), property) import qualified Numeric as Num (showOct) import Octal (readOct, showOct) main :: IO () main = hspecWith defaultConfig {configFastFail = True} specs specs :: Spec specs = describe "octal" $ do -- As of 2016-08-10, there was no reference file -- for the test cases in `exercism/x-common`. it "can show Int octal" $ property $ \(Positive n) -> Num.showOct n "" == showOct (n :: Int) it "can show Integer octal" $ property $ \(Positive n) -> Num.showOct n "" == showOct (n :: Integer) it "can read Int octal" $ property $ \(Positive n) -> n == readOct (Num.showOct (n :: Int) "") it "can read Integer octal" $ property $ \(Positive n) -> n == readOct (Num.showOct (n :: Integer) "")
Version data entries
165 entries across 165 versions & 1 rubygems