mirror of
https://github.com/tfausak/witch.git
synced 2024-11-26 09:43:03 +03:00
Comment out overflowing test cases
This commit is contained in:
parent
b044b7649f
commit
566ff323fd
@ -363,8 +363,8 @@ main = runTestTTAndExit $ "Witch" ~:
|
||||
, "TryFrom Int64 Int" ~:
|
||||
let f = hush . Witch.tryFrom @Int.Int64 @Int in
|
||||
[ f 0 ~?= Just 0
|
||||
, f 9223372036854775807 ~?= Just 9223372036854775807
|
||||
, f (-9223372036854775808) ~?= Just (-9223372036854775808)
|
||||
-- , f 9223372036854775807 ~?= Just 9223372036854775807
|
||||
-- , f (-9223372036854775808) ~?= Just (-9223372036854775808)
|
||||
]
|
||||
, "From Int64 Integer" ~:
|
||||
let f = Witch.from @Int.Int64 @Integer in
|
||||
@ -401,7 +401,7 @@ main = runTestTTAndExit $ "Witch" ~:
|
||||
, "TryFrom Int64 Word" ~:
|
||||
let f = hush . Witch.tryFrom @Int.Int64 @Word in
|
||||
[ f 0 ~?= Just 0
|
||||
, f 9223372036854775807 ~?= Just 9223372036854775807
|
||||
-- , f 9223372036854775807 ~?= Just 9223372036854775807
|
||||
, f (-1) ~?= Nothing
|
||||
]
|
||||
, "TryFrom Int64 Natural" ~:
|
||||
@ -446,9 +446,9 @@ main = runTestTTAndExit $ "Witch" ~:
|
||||
let f = hush . Witch.tryFrom @Int @Int.Int32 in
|
||||
[ f 0 ~?= Just 0
|
||||
, f 2147483647 ~?= Just 2147483647
|
||||
, f 2147483648 ~?= Nothing
|
||||
-- , f 2147483648 ~?= Nothing
|
||||
, f (-2147483648) ~?= Just (-2147483648)
|
||||
, f (-2147483649) ~?= Nothing
|
||||
-- , f (-2147483649) ~?= Nothing
|
||||
]
|
||||
, "From Int Int64" ~:
|
||||
let f = Witch.from @Int @Int.Int64 in
|
||||
@ -479,8 +479,8 @@ main = runTestTTAndExit $ "Witch" ~:
|
||||
, "TryFrom Int Word32" ~:
|
||||
let f = hush . Witch.tryFrom @Int @Word.Word32 in
|
||||
[ f 0 ~?= Just 0
|
||||
, f 4294967295 ~?= Just 4294967295
|
||||
, f 4294967296 ~?= Nothing
|
||||
-- , f 4294967295 ~?= Just 4294967295
|
||||
-- , f 4294967296 ~?= Nothing
|
||||
, f (-1) ~?= Nothing
|
||||
]
|
||||
, "TryFrom Int Word64" ~:
|
||||
@ -512,10 +512,10 @@ main = runTestTTAndExit $ "Witch" ~:
|
||||
, "TryFrom Int Double" ~:
|
||||
let f = hush . Witch.tryFrom @Int @Double in
|
||||
[ f 0 ~?= Just 0
|
||||
, f 9007199254740991 ~?= Just 9007199254740991
|
||||
, f 9007199254740992 ~?= Nothing
|
||||
, f (-9007199254740991) ~?= Just (-9007199254740991)
|
||||
, f (-9007199254740992) ~?= Nothing
|
||||
-- , f 9007199254740991 ~?= Just 9007199254740991
|
||||
-- , f 9007199254740992 ~?= Nothing
|
||||
-- , f (-9007199254740991) ~?= Just (-9007199254740991)
|
||||
-- , f (-9007199254740992) ~?= Nothing
|
||||
]
|
||||
, "TryFrom Integer Int8" ~:
|
||||
let f = hush . Witch.tryFrom @Integer @Int.Int8 in
|
||||
@ -801,7 +801,7 @@ main = runTestTTAndExit $ "Witch" ~:
|
||||
, "TryFrom Word32 Int" ~:
|
||||
let f = hush . Witch.tryFrom @Word.Word32 @Int in
|
||||
[ f 0 ~?= Just 0
|
||||
, f 4294967295 ~?= Just 4294967295
|
||||
-- , f 4294967295 ~?= Just 4294967295
|
||||
]
|
||||
, "From Word32 Integer" ~:
|
||||
let f = Witch.from @Word.Word32 @Integer in
|
||||
@ -840,7 +840,7 @@ main = runTestTTAndExit $ "Witch" ~:
|
||||
, "TryFrom Word64 Word" ~:
|
||||
let f = hush . Witch.tryFrom @Word.Word64 @Word in
|
||||
[ f 0 ~?= Just 0
|
||||
, f 18446744073709551615 ~?= Just 18446744073709551615
|
||||
-- , f 18446744073709551615 ~?= Just 18446744073709551615
|
||||
]
|
||||
, "From Word64 Natural" ~:
|
||||
let f = Witch.from @Word.Word64 @Natural.Natural in
|
||||
@ -910,7 +910,7 @@ main = runTestTTAndExit $ "Witch" ~:
|
||||
let f = hush . Witch.tryFrom @Word @Word.Word32 in
|
||||
[ f 0 ~?= Just 0
|
||||
, f 4294967295 ~?= Just 4294967295
|
||||
, f 4294967296 ~?= Nothing
|
||||
-- , f 4294967296 ~?= Nothing
|
||||
]
|
||||
, "From Word Word64" ~:
|
||||
let f = Witch.from @Word @Word.Word64 in
|
||||
@ -943,8 +943,8 @@ main = runTestTTAndExit $ "Witch" ~:
|
||||
, "TryFrom Word Int64" ~:
|
||||
let f = hush . Witch.tryFrom @Word @Int.Int64 in
|
||||
[ f 0 ~?= Just 0
|
||||
, f 9223372036854775807 ~?= Just 9223372036854775807
|
||||
, f 9223372036854775808 ~?= Nothing
|
||||
-- , f 9223372036854775807 ~?= Just 9223372036854775807
|
||||
-- , f 9223372036854775808 ~?= Nothing
|
||||
]
|
||||
, "TryFrom Word Int" ~:
|
||||
let f = hush . Witch.tryFrom @Word @Int in
|
||||
@ -966,8 +966,8 @@ main = runTestTTAndExit $ "Witch" ~:
|
||||
, "TryFrom Word Double" ~:
|
||||
let f = hush . Witch.tryFrom @Word @Double in
|
||||
[ f 0 ~?= Just 0
|
||||
, f 9007199254740991 ~?= Just 9007199254740991
|
||||
, f 9007199254740992 ~?= Nothing
|
||||
-- , f 9007199254740991 ~?= Just 9007199254740991
|
||||
-- , f 9007199254740992 ~?= Nothing
|
||||
]
|
||||
, "TryFrom Natural Word8" ~:
|
||||
let f = hush . Witch.tryFrom @Natural.Natural @Word.Word8 in
|
||||
@ -1236,9 +1236,9 @@ main = runTestTTAndExit $ "Witch" ~:
|
||||
, "TryFrom Double Int" ~:
|
||||
let f = hush . Witch.tryFrom @Double @Int in
|
||||
[ f 0 ~?= Just 0
|
||||
, f 9007199254740991 ~?= Just 9007199254740991
|
||||
-- , f 9007199254740991 ~?= Just 9007199254740991
|
||||
, f 9007199254740992 ~?= Nothing
|
||||
, f (-9007199254740991) ~?= Just (-9007199254740991)
|
||||
-- , f (-9007199254740991) ~?= Just (-9007199254740991)
|
||||
, f (-9007199254740992) ~?= Nothing
|
||||
, f (0 / 0) ~?= Nothing
|
||||
, f (1 / 0) ~?= Nothing
|
||||
@ -1294,7 +1294,7 @@ main = runTestTTAndExit $ "Witch" ~:
|
||||
, "TryFrom Double Word" ~:
|
||||
let f = hush . Witch.tryFrom @Double @Word in
|
||||
[ f 0 ~?= Just 0
|
||||
, f 9007199254740991 ~?= Just 9007199254740991
|
||||
-- , f 9007199254740991 ~?= Just 9007199254740991
|
||||
, f 9007199254740992 ~?= Nothing
|
||||
, f (0 / 0) ~?= Nothing
|
||||
, f (1 / 0) ~?= Nothing
|
||||
|
Loading…
Reference in New Issue
Block a user