Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 2 commits into from
May 13, 2020

Conversation

vrom911
Copy link
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
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
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
@@ -208,7 +211,6 @@ test-suite relude-doctest
build-depends: relude
, doctest
, Glob
, QuickCheck

ghc-options: -threaded
if impl(ghc >= 8.10)
Copy link
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

@@ -190,10 +190,13 @@ test-suite relude-test
hs-source-dirs: test
main-is: Spec.hs

other-modules: Test.Relude.Property
other-modules: Test.Relude.Gen
Test.Relude.Container.One
Copy link
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
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