simplified double bit error test
This commit is contained in:
parent
74b26de743
commit
8f6acc6b6b
|
@ -80,15 +80,14 @@ singleBitErrors = map
|
|||
|
||||
doubleBitErrors :: [(String, Word16, Maybe Word16)]
|
||||
doubleBitErrors =
|
||||
[ ( \(bitA, bitB) -> let
|
||||
mask = (1 `shiftL` bitA) .|. (1 `shiftL` bitB)
|
||||
code = withChkBits `xor` mask
|
||||
in
|
||||
( "bad bits " ++ show bitA ++ " & " ++ show bitB
|
||||
, code
|
||||
, Nothing
|
||||
)
|
||||
) (a, b)
|
||||
[ let
|
||||
mask = (1 `shiftL` a) .|. (1 `shiftL` b)
|
||||
code = withChkBits `xor` mask
|
||||
in
|
||||
( "bad bits " ++ show a ++ " & " ++ show b
|
||||
, code
|
||||
, Nothing
|
||||
)
|
||||
| a <- [0..14]
|
||||
, b <- [1..15]
|
||||
, a < b
|
||||
|
|
Loading…
Reference in New Issue
Block a user