rename handle to context
This commit is contained in:
parent
50a1186ab8
commit
88b8da59f0
1 changed files with 6 additions and 6 deletions
12
Tests.hs
12
Tests.hs
|
@ -165,17 +165,17 @@ prop_handshake_initiate = do
|
||||||
someWords8 :: Int -> Gen [Word8]
|
someWords8 :: Int -> Gen [Word8]
|
||||||
someWords8 i = replicateM i (fromIntegral <$> (choose (0,255) :: Gen Int))
|
someWords8 i = replicateM i (fromIntegral <$> (choose (0,255) :: Gen Int))
|
||||||
|
|
||||||
tlsServer handle queue = do
|
tlsServer ctx queue = do
|
||||||
success <- handshake handle
|
success <- handshake ctx
|
||||||
unless success $ fail "handshake failed on server side"
|
unless success $ fail "handshake failed on server side"
|
||||||
d <- recvData handle
|
d <- recvData ctx
|
||||||
writeChan queue d
|
writeChan queue d
|
||||||
return ()
|
return ()
|
||||||
tlsClient queue handle = do
|
tlsClient queue ctx = do
|
||||||
success <- handshake handle
|
success <- handshake ctx
|
||||||
unless success $ fail "handshake failed on client side"
|
unless success $ fail "handshake failed on client side"
|
||||||
d <- readChan queue
|
d <- readChan queue
|
||||||
sendData handle d
|
sendData ctx d
|
||||||
return ()
|
return ()
|
||||||
|
|
||||||
assertEq expected got = unless (expected == got) $ error ("got " ++ show got ++ " but was expecting " ++ show expected)
|
assertEq expected got = unless (expected == got) $ error ("got " ++ show got ++ " but was expecting " ++ show expected)
|
||||||
|
|
Loading…
Reference in a new issue