mirror of
https://github.com/urbit/shrub.git
synced 2025-01-01 17:16:47 +03:00
Update tests.
This commit is contained in:
parent
ce193616b4
commit
849410e1fe
@ -113,8 +113,8 @@ twoTalk = forAll arbitrary (ioProperty . runNetworkApp . runTest)
|
||||
go aliceShip bobShip val = runRAcquire $ do
|
||||
(aliceQ, alice) <- runGala aliceShip
|
||||
(bobQ, bob) <- runGala bobShip
|
||||
sendThread alice (Galaxy bobShip, val)
|
||||
sendThread bob (Galaxy aliceShip, val)
|
||||
sendThread alice (Patp bobShip, val)
|
||||
sendThread bob (Patp aliceShip, val)
|
||||
liftIO (waitForPacket aliceQ val >> waitForPacket bobQ val)
|
||||
|
||||
tests :: TestTree
|
||||
@ -140,10 +140,12 @@ instance Arbitrary Ipv4 where arbitrary = Ipv4 <$> arb
|
||||
instance Arbitrary Port where arbitrary = Port <$> arb
|
||||
instance Arbitrary Wen where arbitrary = Wen <$> arb
|
||||
instance Arbitrary Gap where arbitrary = Gap . abs <$> arb
|
||||
instance Arbitrary Galaxy where arbitrary = Galaxy <$> arb
|
||||
instance Arbitrary Bytes where arbitrary = pure (MkBytes "wtfbbq")
|
||||
-- MkBytes . take 100 <$> arb
|
||||
|
||||
instance Arbitrary a => Arbitrary (Patp a) where
|
||||
arbitrary = Patp <$> arb
|
||||
|
||||
instance Arbitrary ByteString where
|
||||
arbitrary = pack <$> arbitrary
|
||||
|
||||
|
@ -85,11 +85,13 @@ instance Arbitrary File where arbitrary = File <$> arb
|
||||
instance Arbitrary Cord where arbitrary = Cord <$> arb
|
||||
instance Arbitrary Wen where arbitrary = Wen <$> arb
|
||||
instance Arbitrary Gap where arbitrary = Gap . abs <$> arb
|
||||
instance Arbitrary Galaxy where arbitrary = Galaxy <$> arb
|
||||
instance Arbitrary Port where arbitrary = Port <$> arb
|
||||
instance Arbitrary Ship where arbitrary = Ship <$> arb
|
||||
instance Arbitrary Address where arbitrary = AAmes <$> arb
|
||||
|
||||
instance Arbitrary a => Arbitrary (Patp a) where
|
||||
arbitrary = Patp <$> arb
|
||||
|
||||
genIpv4 :: Gen Ipv4
|
||||
genIpv4 = do
|
||||
x <- arbitrary
|
||||
|
Loading…
Reference in New Issue
Block a user