Sha256: f1522de3edecabd35ded74101c3151e7afe38270ac6513c992b4b8376b9997aa
Contents?: true
Size: 774 Bytes
Versions: 229
Compression:
Stored size: 774 Bytes
Contents
import Test.Hspec (Spec, 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 = do 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
229 entries across 229 versions & 1 rubygems