Skip to content

[#281] Move One property tests from 'doctest' to 'hedgehog' #288

Merged
chshersh merged 2 commits intomasterfrom
vrom911/281-Move-property-based-tests-from-doctest
May 13, 2020
Merged

[#281] Move One property tests from 'doctest' to 'hedgehog' #288
chshersh merged 2 commits intomasterfrom
vrom911/281-Move-property-based-tests-from-doctest

Conversation

@vrom911
Copy link
Copy Markdown
Member

@vrom911 vrom911 commented May 13, 2020

Resolves #281

@vrom911 vrom911 added doc README, Haddock documentation, tutorials tests labels May 13, 2020
@vrom911 vrom911 requested a review from chshersh as a code owner May 13, 2020 18:29
@vrom911 vrom911 self-assigned this May 13, 2020
Copy link
Copy Markdown
Contributor

@hint-man hint-man bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is no place for me here... I will choose the truth I like.

Copy link
Copy Markdown
Contributor

@chshersh chshersh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks very nice! Our tests and docs are better and better 📚 💟

relude.cabal Outdated
, QuickCheck

ghc-options: -threaded
if impl(ghc >= 8.10)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess this warning supression also can be removed


other-modules: Test.Relude.Property
other-modules: Test.Relude.Gen
Test.Relude.Container.One
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like when the test structure mirrors module structure 💦

Comment on lines +22 to +37
oneProps = Group "'One' typeclass property tests"
[ ( "length (one @[a] x) ≡ 1", oneListProp)
, ( "length (one @(NonEmpty a) x) ≡ 1", oneNonEmptyProp)
, ( "length (one @(Seq a) x) ≡ 1", oneSeqProp)
, ( "length (one @Text x) ≡ 1", oneTextProp)
, ( "length (one @LText x) ≡ 1", oneLTextProp)
, ( "length (one @ByteString x) ≡ 1", oneByteStringProp)
, ( "length (one @LByteString x) ≡ 1", oneLByteStringProp)
, ( "length (one @ShortByteString x) ≡ 1", oneShortByteStringProp)
, ( "length (one @(Map k v) x) ≡ 1", oneMapProp)
, ( "length (one @(HashMap k v) x) ≡ 1", oneHashMapProp)
, ( "length (one @(IntMap v) x) ≡ 1", oneIntMapProp)
, ( "length (one @(Set a) x) ≡ 1", oneSetProp)
, ( "length (one @(HashSet a) x) ≡ 1", oneHashSetProp)
, ( "length (one @(IntSet x) ≡ 1", oneIntSetProp)
]
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Top test names!

@chshersh chshersh merged commit b27da98 into master May 13, 2020
@chshersh chshersh deleted the vrom911/281-Move-property-based-tests-from-doctest branch May 13, 2020 21:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

doc README, Haddock documentation, tutorials tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Move property-based tests from 'doctest' to 'hedgehog' for the 'One' typeclass

2 participants