@@ -17,8 +17,8 @@ import Data.Typeable()
17
17
import Network.Transport.TCP
18
18
import qualified Network.Transport as NT
19
19
20
- import Test.Framework ( Test , testGroup , defaultMain )
21
- import Test.Framework.Providers .HUnit (testCase )
20
+ import Test.Tasty ( TestTree , testGroup , defaultMain )
21
+ import Test.Tasty .HUnit (testCase )
22
22
23
23
testAsyncPoll :: TestResult (AsyncResult () ) -> Process ()
24
24
testAsyncPoll result = do
@@ -158,8 +158,8 @@ testAsyncRecursive result = do
158
158
myNode <- getSelfNode
159
159
fib (myNode,6 ) >>= stash result
160
160
161
- tests :: LocalNode -> [ Test ]
162
- tests localNode = [
161
+ tests :: LocalNode -> TestTree
162
+ tests localNode = testGroup " " [
163
163
testGroup " Handling async results with STM" [
164
164
testCase " testAsyncCancel"
165
165
(delayedAssertion
@@ -210,14 +210,14 @@ tests localNode = [
210
210
]
211
211
]
212
212
213
- asyncStmTests :: NT. Transport -> IO [ Test ]
213
+ asyncStmTests :: NT. Transport -> IO TestTree
214
214
asyncStmTests transport = do
215
215
localNode <- newLocalNode transport $ __remoteTableDecl initRemoteTable
216
216
let testData = tests localNode
217
217
return testData
218
218
219
219
-- | Given a @builder@ function, make and run a test suite on a single transport
220
- testMain :: (NT. Transport -> IO [ Test ] ) -> IO ()
220
+ testMain :: (NT. Transport -> IO TestTree ) -> IO ()
221
221
testMain builder = do
222
222
Right (transport, _) <- createTransportExposeInternals (defaultTCPAddr " 127.0.0.1" " 0" ) defaultTCPParameters
223
223
testData <- builder transport
0 commit comments