Skip to content
This repository was archived by the owner on Sep 20, 2023. It is now read-only.

Refactor tests: try to improve dev compile time #107

Merged
merged 7 commits into from
Sep 3, 2016
Merged

Conversation

NicolasDP
Copy link
Member

Testing has been a bit long so far:

Before:

stack test 128.66s user 5.99s system 94% cpu 2:21.96 total

After:

stack test 85.86s user 5.30s system 97% cpu 1:33.84 total

Also, contributors will find that, when working on a specific test, it will be a bit faster as well to generate the test.

I have also added a couple of test of the Number type class, mainly to validate the property specified in the documentation (associativity of the Additive...)

@NicolasDP
Copy link
Member Author

The added tests are:

  Additive
    a + azero == a:                                       OK
      +++ OK, passed 100 tests.
    azero + a == a:                                       OK
      +++ OK, passed 100 tests.
    a + b == b + a:                                       OK
      +++ OK, passed 100 tests.
  Multiplicative
    a * midentity == a:                                   OK
      +++ OK, passed 100 tests.
    midentity * a == a:                                   OK
      +++ OK, passed 100 tests.
  Divisible
    (x `div` y) * y + (x `mod` y) == x:                   OK
      +++ OK, passed 100 tests.

@NicolasDP NicolasDP added the C - tests tests stuff label Sep 3, 2016
@adinapoli
Copy link
Contributor

adinapoli commented Sep 3, 2016

Just throwing some brain dump here: what would also be useful is a QC property on a collection which would ensure that forall arbitrary $ \(lst :: [ty) -> lst == toList (fromList lst) 😉

@NicolasDP
Copy link
Member Author

NicolasDP commented Sep 3, 2016

@adinapoli you mean like this one:

  Bitmap
    ...
    IsList
      fromList . toList == id:                                OK
        +++ OK, passed 100 tests.

I have also re-order few tests

@NicolasDP NicolasDP merged commit 840901e into master Sep 3, 2016
@adinapoli
Copy link
Contributor

Yes, exactly like that! (Sorry, I missed that property while reading the
source) ;)

On 3 Sep 2016 11:20 p.m., "Nicolas DI PRIMA" [email protected]
wrote:

Merged #107 #107.


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#107 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAa-s8SvUDY-2kHhb3oS-4mLxLs5MfiYks5qmeS4gaJpZM4J0TqK
.

@NicolasDP NicolasDP deleted the nicolas/new-test branch September 11, 2016 08:55
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
C - tests tests stuff
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants