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

Testsets for numbers #23862

Merged
merged 2 commits into from
Oct 1, 2017
Merged

Testsets for numbers #23862

merged 2 commits into from
Oct 1, 2017

Conversation

kshyatt
Copy link
Contributor

@kshyatt kshyatt commented Sep 24, 2017

No description provided.

@kshyatt kshyatt added maths Mathematical functions test This change adds or pertains to unit tests labels Sep 24, 2017
@kshyatt kshyatt requested a review from fredrikekre September 24, 2017 20:00
@kshyatt
Copy link
Contributor Author

kshyatt commented Sep 24, 2017

I think I managed to screw something up in this 3000+ line file...

@fredrikekre
Copy link
Member

Looks correct to me. The failure is weird though:

Test Failed
 Expression: fld(0.3, 0.01) == 29.0
  Evaluated: 30.0 == 29.0

@fredrikekre
Copy link
Member

Reduced to the following:

@testset begin
    @test fld(0.3,0.01) == 29.0
    @test div(0.3,0.01) == 29.0
end

The above two tests fail while inside a @testset:

julia> @testset begin
           @test fld(0.3,0.01) == 29.0
           @test div(0.3,0.01) == 29.0
       end
test set: Test Failed
  Expression: fld(0.3, 0.01) == 29.0
   Evaluated: 30.0 == 29.0
Stacktrace:
 [1] macro expansion at ./REPL[2]:2 [inlined]
 [2] macro expansion at ./test.jl:942 [inlined]
 [3] anonymous at ./<missing>:?
test set: Test Failed
  Expression: div(0.3, 0.01) == 29.0
   Evaluated: 30.0 == 29.0
Stacktrace:
 [1] macro expansion at ./REPL[2]:3 [inlined]
 [2] macro expansion at ./test.jl:942 [inlined]
 [3] anonymous at ./<missing>:?
Test Summary: | Fail  Total
test set      |    2      2
ERROR: Some tests did not pass: 0 passed, 2 failed, 0 errored, 0 broken.

Without the testset they pass just fine:

julia> @test fld(0.3,0.01) == 29.
Test Passed

julia> @test div(0.3,0.01) == 29.0
Test Passed

@kshyatt
Copy link
Contributor Author

kshyatt commented Sep 24, 2017

lol wut

@fredrikekre
Copy link
Member

fredrikekre commented Sep 25, 2017

Interesting fact: Adding the testsets in this file increased runtime with 14%, from 70 to 80 seconds.

@fredrikekre
Copy link
Member

#23796 × 2 and also an (unrelated?) failure in ranges on circle CI i686:

    FAILURE
Error in testset ranges:
Test Failed
  Expression: cmp_sn2(Tw(xw / yw), astuple(x / y)..., slopbits)

ERROR: LoadError: Test run finished with errors
in expression starting at /tmp/julia/share/julia/test/runtests.jl:29

What's up with that?

@fredrikekre fredrikekre reopened this Sep 30, 2017
@fredrikekre
Copy link
Member

Circle CI does not restart when closing/opening PRs? Relevant tests passed anyway.

@fredrikekre fredrikekre merged commit aeae9d3 into master Oct 1, 2017
@fredrikekre fredrikekre deleted the ksh/tsnums branch October 1, 2017 10:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
maths Mathematical functions test This change adds or pertains to unit tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants