-
Notifications
You must be signed in to change notification settings - Fork 58
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
Add a proper test suite #89
Comments
Alas, this is not as easy to accomplish as it sounds. That being said, there is a relatively serviceable workaround: turn the test suite into its own |
I've opened #90 to implement the suggestion in #89 (comment). Once that is merged (pending Travis giving a green check mark), that should make setting up |
Great! Have you had a chance to look at my folds and traversals?
On Mar 19, 2018 10:02 AM, "Ryan Scott" <[email protected]> wrote:
I've opened #90 <#90> to implement
the suggestion in #89 (comment)
<#89 (comment)>.
Once that is merged (pending Travis giving a green check mark), that should
make setting up QuickCheck tests far, far easier.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#89 (comment)>,
or mute
the thread
<https://github.com/notifications/unsubscribe-auth/ABzi_cjSqtw0ZCpwiNickjoOADr4_uY_ks5tf7qPgaJpZM4SvpGw>
.
|
@RyanGlScott Thanks for moving the test suite into its own project. I'm going to work on adding some property tests. |
Andrew, please let me know if/when you start, and with what. I'll do the
same.
…On Mar 20, 2018 1:40 PM, "Andrew Martin" ***@***.***> wrote:
@RyanGlScott <https://github.com/ryanglscott> Thanks for moving the test
suite into its own project. I'm going to work on adding some property tests.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#89 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABzi_dR0p0grV5A3WHvVtZEO304c7KtAks5tgT8DgaJpZM4SvpGw>
.
|
I'm working on it now. I'm going to use |
Thanks @andrewthad! Do be aware that |
Sounds great! I'll be happy to help expand it once you get it going.
…On Mar 20, 2018 1:52 PM, "Andrew Martin" ***@***.***> wrote:
I'm working on it now. I'm going to use tasty + quickcheck +
quickcheck-classes just as an easy way to get access to some of the
typeclass property tests we're interested in.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#89 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABzi_e1EAc5dwWaq9pvocfWMfy_0v2ELks5tgUHSgaJpZM4SvpGw>
.
|
@RyanGlScott Good point. Let me see if I can get quickcheck-classes to support older GHCs. I don't think there's any fundamental reason that it can't. |
It was more difficult than I expected, but I now have |
Huzzah! Unfortunately, monadAssoc :: ... => m A -> Fun A (m B) -> Fun B (m C) -> Property
monadAssoc m f g = (m >>= \x -> apply f x >>= apply g) `equivalent`
((m >>= apply f) >>= apply g) For |
I've got a start on it here: #99. Already, we can see that it fails the laws for @treeowl I agree that it's currently missing several things. I had never done |
I’m nearly done with getting random updated in shape. But I could pull out
split mix so we have a copy in primitive too. That would address circular
deps perhaps ?
…On Tue, Mar 20, 2018 at 5:22 PM Andrew Martin ***@***.***> wrote:
I've got a start on it here: #99
<#99>. Already, we can see that
it fails the laws for Functor, which is expected.
@treeowl <https://github.com/treeowl> I agree that it's currently missing
several things. I had never done Traverable since those are normally
derived. I had only done Foldable (also normally easy to derive) as an
exercise since the strict variants of the fold functions are tricky to test
correctly. I've never used Test.QuickCheck.Function, and it's almost
certainly a better way to test some of the monad properties than what I
came up with.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#89 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAAQwmFg9U6o8ZPS0FpycgEYhM2czOdwks5tgXMRgaJpZM4SvpGw>
.
|
For |
@cartazio, I don't see how that could help. |
@andrewthad, are we ready to close this, or are there still non-trivial functions that lack adequate tests? |
We still aren't testing the following typeclass instances: |
Done! I opened up an issue to track test suite expansion. |
I just went to try to add QuickCheck or SmallCheck properties to the test suite, and discovered that there isn't a proper test suite. Ack! No wonder the
Foldable
instance forArray
managed to be wrong for so long! I'll be happy to write some properties, but I don't have the time right now to set up the framework.The text was updated successfully, but these errors were encountered: