tests :: [TestTree]
tests = 
    [ testGroup "Settle"

        [ testGroup "Non-Closing" $ TChunkedQueue.testWith settleTester
        , testGroup "Closing" $ testClosing settleTester ]

    , testGroup "Timeout"

        [ testGroup "Non-Closing"
            [ testCase "One" $ timeoutTester shortPause [
                    Enqueue [0],
                    Wait longPause,
                    Enqueue [1]]
                    $ expect [Just [0], Just [1]]

            , testCase "Two" $ timeoutTester longPause [
                    Enqueue [0],
                    Wait shortPause,
                    Enqueue [1],
                    Wait longPause,
                    Enqueue [2]]
                    $ expect [Just [0, 1], Just [2]]

            , testCase "Many" $ timeoutTester longPause (
                    concatMap (\i -> [Enqueue [i], Wait shortPause]) [1..10]
                    )
                    $ expect [Just [1..6], Just [7..10]]
            ]

        , testGroup "Closing" $ testClosing $ timeoutTester shortPause
        ]
    ]

    where
        expect = id
tests :: [TestTree]
tests = 
    [ testGroup "Settle"

        [ testGroup "Non-Closing" $ TChunkedQueue.testWith settleTester
        , testGroup "Closing" $ testClosing settleTester ]

    , testGroup "Timeout"

        [ testGroup "Non-Closing"
            [ testCase "One" $ timeoutTester shortPause [
                    Enqueue [0],
                    Wait longPause,
                    Enqueue [1]]
                    $ expect [Just [0], Just [1]]

            , testCase "Two" $ timeoutTester longPause [
                    Enqueue [0],
                    Wait shortPause,
                    Enqueue [1],
                    Wait longPause,
                    Enqueue [2]]
                    $ expect [Just [0, 1], Just [2]]

            , testCase "Many" $ timeoutTester longPause (
                    concatMap (\i -> [Enqueue [i], Wait shortPause]) [1..10]
                    )
                    $ expect [Just [1..6], Just [7..10]]
            ]

        , testGroup "Closing" $ testClosing $ timeoutTester shortPause
        ]
    ]

    where
        expect = id
tests = 
    [ testGroup "Settle"

        [ testGroup "Non-Closing" $ TChunkedQueue.testWith settleTester
        , testGroup "Closing" $ testClosing settleTester ]

    , testGroup "Timeout"

        [ testGroup "Non-Closing"
            [ testCase "One" $ timeoutTester shortPause [
                    Enqueue [0],
                    Wait longPause,
                    Enqueue [1]]
                    $ expect [Just [0], Just [1]]

            , testCase "Two" $ timeoutTester longPause [
                    Enqueue [0],
                    Wait shortPause,
                    Enqueue [1],
                    Wait longPause,
                    Enqueue [2]]
                    $ expect [Just [0, 1], Just [2]]

            , testCase "Many" $ timeoutTester longPause (
                    concatMap (\i -> [Enqueue [i], Wait shortPause]) [1..10]
                    )
                    $ expect [Just [1..6], Just [7..10]]
            ]

        , testGroup "Closing" $ testClosing $ timeoutTester shortPause
        ]
    ]

    where
        expect = id