diff --git a/.github/workflows/haskell-ci.yml b/.github/workflows/haskell-ci.yml index dd6870e0d..49c3b3aa2 100644 --- a/.github/workflows/haskell-ci.yml +++ b/.github/workflows/haskell-ci.yml @@ -251,6 +251,12 @@ jobs: - name: tests run: | $CABAL v2-test $ARG_COMPILER $ARG_TESTS $ARG_BENCH all --test-show-details=direct + $CABAL v2-test $ARG_COMPILER $ARG_TESTS $ARG_BENCH all --test-show-details=direct --test-options="--pattern=intset --quickcheck-tests=10000" + $CABAL v2-test $ARG_COMPILER $ARG_TESTS $ARG_BENCH all --test-show-details=direct --test-options="--pattern=intset --quickcheck-tests=1000 --quickcheck-max-size=100" + $CABAL v2-test $ARG_COMPILER $ARG_TESTS $ARG_BENCH all --test-show-details=direct --test-options="--pattern=intset --quickcheck-tests=10 --quickcheck-max-size=1000" + $CABAL v2-test $ARG_COMPILER $ARG_TESTS $ARG_BENCH all --test-show-details=direct --test-options="--pattern=intmap --quickcheck-tests=10000" + $CABAL v2-test $ARG_COMPILER $ARG_TESTS $ARG_BENCH all --test-show-details=direct --test-options="--pattern=intmap --quickcheck-tests=1000 --quickcheck-max-size=100" + $CABAL v2-test $ARG_COMPILER $ARG_TESTS $ARG_BENCH all --test-show-details=direct --test-options="--pattern=intmap --quickcheck-tests=10 --quickcheck-max-size=1000" - name: haddock run: | if [ $((HCNUMVER >= 80200)) -ne 0 ] ; then $CABAL v2-haddock --haddock-all $ARG_COMPILER --with-haddock $HADDOCK $ARG_TESTS $ARG_BENCH all ; fi diff --git a/containers-tests/tests/intmap-properties.hs b/containers-tests/tests/intmap-properties.hs index 8d26439c0..e912fd4b9 100644 --- a/containers-tests/tests/intmap-properties.hs +++ b/containers-tests/tests/intmap-properties.hs @@ -219,16 +219,16 @@ apply3 f a b c = apply f (a, b, c) {-------------------------------------------------------------------- - Arbitrary, reasonably balanced trees + Arbitrary IntMaps, including those with large keys --------------------------------------------------------------------} instance Arbitrary a => Arbitrary (IntMap a) where - arbitrary = fmap fromList arbitrary + arbitrary = fmap (fromList . fmap (\(k,v) -> (getLarge k, v))) arbitrary newtype NonEmptyIntMap a = NonEmptyIntMap {getNonEmptyIntMap :: IntMap a} deriving (Eq, Show) instance Arbitrary a => Arbitrary (NonEmptyIntMap a) where - arbitrary = fmap (NonEmptyIntMap . fromList . getNonEmpty) arbitrary + arbitrary = fmap (NonEmptyIntMap . fromList . fmap (\(k,v) -> (getLarge k, v)) . getNonEmpty) arbitrary ------------------------------------------------------------------------ diff --git a/containers-tests/tests/intset-properties.hs b/containers-tests/tests/intset-properties.hs index d0c10bf0b..8b769e71d 100644 --- a/containers-tests/tests/intset-properties.hs +++ b/containers-tests/tests/intset-properties.hs @@ -109,11 +109,11 @@ test_split = do split 3 (fromList [1..5]) @?= (fromList [1,2], fromList [4,5]) {-------------------------------------------------------------------- - Arbitrary, reasonably balanced trees + Arbitrary IntSets, including those with large elements --------------------------------------------------------------------} instance Arbitrary IntSet where arbitrary = do{ xs <- arbitrary - ; return (fromList xs) + ; return (fromList (fmap getLarge xs)) } {--------------------------------------------------------------------