From 8b067e765c249beff379d4d416cd7dff702b51fb Mon Sep 17 00:00:00 2001 From: Sam Truzjan Date: Thu, 27 Feb 2014 14:51:44 +0400 Subject: Fix indentation --- tests/Network/BitTorrent/Tracker/RPC/UDPSpec.hs | 64 ++++++++++++------------- 1 file changed, 32 insertions(+), 32 deletions(-) (limited to 'tests') diff --git a/tests/Network/BitTorrent/Tracker/RPC/UDPSpec.hs b/tests/Network/BitTorrent/Tracker/RPC/UDPSpec.hs index c406aabd..598b2866 100644 --- a/tests/Network/BitTorrent/Tracker/RPC/UDPSpec.hs +++ b/tests/Network/BitTorrent/Tracker/RPC/UDPSpec.hs @@ -97,35 +97,35 @@ spec = parallel $ do scrape mgr (trackerURI badTracker) [def] `shouldThrow` isSomeException describe "RPC" $ do - forM_ (L.filter isUdpTracker trackers) $ \ TrackerEntry {..} -> - context trackerName $ do - - describe "announce" $ do - if tryAnnounce then do - it "have valid response" $ do - withManager rpcOpts $ \ mgr -> do - q <- arbitrarySample - announce mgr trackerURI q >>= validateInfo q - else do - it "should throw TimeoutExpired" $ do - withManager rpcOpts $ \ mgr -> do - q <- arbitrarySample - announce mgr trackerURI q `shouldThrow` isTimeoutExpired - - describe "scrape" $ do - if tryScraping then do - it "have valid response" $ do - withManager rpcOpts $ \ mgr -> do - xs <- scrape mgr trackerURI [def] - L.length xs `shouldSatisfy` (>= 1) - else do - it "should throw TimeoutExpired" $ do - withManager rpcOpts $ \ mgr -> do - scrape mgr trackerURI [def] `shouldThrow` isTimeoutExpired - - describe "Manager" $ do - when tryScraping $ do - it "should handle arbitrary intermixed concurrent queries" $ do - withManager rpcOpts $ \ mgr -> do - _ <- mapConcurrently (\ _ -> scrape mgr trackerURI [def]) [1..rpcCount] - return () \ No newline at end of file + forM_ (L.filter isUdpTracker trackers) $ \ TrackerEntry {..} -> + context trackerName $ do + + describe "announce" $ do + if tryAnnounce then do + it "have valid response" $ do + withManager rpcOpts $ \ mgr -> do + q <- arbitrarySample + announce mgr trackerURI q >>= validateInfo q + else do + it "should throw TimeoutExpired" $ do + withManager rpcOpts $ \ mgr -> do + q <- arbitrarySample + announce mgr trackerURI q `shouldThrow` isTimeoutExpired + + describe "scrape" $ do + if tryScraping then do + it "have valid response" $ do + withManager rpcOpts $ \ mgr -> do + xs <- scrape mgr trackerURI [def] + L.length xs `shouldSatisfy` (>= 1) + else do + it "should throw TimeoutExpired" $ do + withManager rpcOpts $ \ mgr -> do + scrape mgr trackerURI [def] `shouldThrow` isTimeoutExpired + + describe "Manager" $ do + when tryScraping $ do + it "should handle arbitrary intermixed concurrent queries" $ do + withManager rpcOpts $ \ mgr -> do + _ <- mapConcurrently (\ _ -> scrape mgr trackerURI [def]) [1..rpcCount] + return () \ No newline at end of file -- cgit v1.2.3