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

Rewrite tests to use Base.Test #205

Merged
merged 6 commits into from
Feb 17, 2017
Merged

Rewrite tests to use Base.Test #205

merged 6 commits into from
Feb 17, 2017

Conversation

lbenet
Copy link
Member

@lbenet lbenet commented Feb 16, 2017

Currently, some tests (involving some functions) do not pass due
to CRlibm

Currently, some tests (involving some functions) do not pass due
to CRlibm
@lbenet
Copy link
Member Author

lbenet commented Feb 16, 2017

Addresses #193

ITF1788 files not yet modified, since this is better to using directly the tools provided by ITF1788...

@lbenet
Copy link
Member Author

lbenet commented Feb 16, 2017

Incidentally, these changes will only be useful once we leave 0.4 without support.

@dpsanders
Copy link
Member

Great, thanks! On Julia 0.4 you need using BaseTestNext to use @testset.

@lbenet
Copy link
Member Author

lbenet commented Feb 16, 2017

What about @compat?

@dpsanders
Copy link
Member

Not sure what you are asking about @compat?

@dpsanders
Copy link
Member

@coveralls
Copy link

Coverage Status

Coverage decreased (-1.3%) to 89.329% when pulling c0b4b24 on Base.Test into 4af546d on master.

@lbenet
Copy link
Member Author

lbenet commented Feb 16, 2017

I though that @compat using Base.Test could save us replacing that for

if VERSION >= v"0.5.0-dev+7720"
    using Base.Test
else
    using BaseTestNext
    const Test = BaseTestNext
end

in each file. But i couldn't find it.

How do we deal with the REQUIRES in this case?

@dpsanders
Copy link
Member

dpsanders commented Feb 16, 2017 via email

@lbenet
Copy link
Member Author

lbenet commented Feb 16, 2017

No, though that could indeed be a solution; each included file has the using command.

@dpsanders
Copy link
Member

dpsanders commented Feb 16, 2017 via email

@codecov-io
Copy link

codecov-io commented Feb 16, 2017

Codecov Report

Merging #205 into master will decrease coverage by -0.21%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master     #205      +/-   ##
==========================================
- Coverage   90.65%   90.45%   -0.21%     
==========================================
  Files          23       23              
  Lines         985      985              
==========================================
- Hits          893      891       -2     
- Misses         92       94       +2
Impacted Files Coverage Δ
src/ValidatedNumerics.jl 100% <ø> (ø)
src/intervals/arithmetic.jl 98.64% <ø> (-1.36%)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4af546d...402b9c4. Read the comment docs.

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.9%) to 89.736% when pulling bc4a242 on Base.Test into 4af546d on master.

@coveralls
Copy link

coveralls commented Feb 17, 2017

Coverage Status

Coverage decreased (-0.2%) to 90.457% when pulling 402b9c4 on Base.Test into 4af546d on master.

@dpsanders
Copy link
Member

Looking good! Is this ready to merge?

@lbenet
Copy link
Member Author

lbenet commented Feb 17, 2017

Not yet; on the one hand, there is something weird with Julia 0.6; I'm also trying to transform the ITF1788 tests. I'll let you know when I think it is ready.

@dpsanders
Copy link
Member

Don't worry about 0.6. I finally got tests to pass on the fix_radius_0.6 branch that requires us to change from FixedSizeArrays.jl to StaticArrays.jl.

I suggest we merge this and the itf1788 tests can be in a separate pr.

@lbenet
Copy link
Member Author

lbenet commented Feb 17, 2017

Ok. Then go ahead.

@lbenet
Copy link
Member Author

lbenet commented Feb 17, 2017

One of the tests that is not passing in v0.6 yields the following output

Operations on boxes: Error During Test
  Test threw an exception of type ErrorException
  Expression: 2A == IntervalBox(2 .. 4, 6 .. 8)
  type TypeName has no field primary
  Stacktrace:
   [1] promote_type_nested(::Type{T} where T<:Tuple) at /Users/benet/.julia/v0.6/FixedSizeArrays/src/core.jl:181
   [2] construct_similar(...) at /Users/benet/.julia/v0.6/FixedSizeArrays/src/core.jl:230
   [3] macro expansion at /Users/benet/.julia/v0.6/FixedSizeArrays/src/mapreduce.jl:81 [inlined]
   [4] map at /Users/benet/.julia/v0.6/FixedSizeArrays/src/mapreduce.jl:119 [inlined]
   [5] *(::Int64, ::ValidatedNumerics.IntervalBox{2,Float64}) at /Users/benet/.julia/v0.6/FixedSizeArrays/src/ops.jl:95
   [6] macro expansion at /Users/benet/.julia/v0.5/ValidatedNumerics/test/multidim_tests/multidim.jl:13 [inlined]
   [7] macro expansion at ./test.jl:853 [inlined]
   [8] anonymous at ./<missing>:?

I guess this is related to the new type nomenclature...

I haven't checked if there are other problems.

@dpsanders
Copy link
Member

I'm not sure what exactly it's related to, but it's fixed by the latest StaticArrays.jl update.

@dpsanders dpsanders merged commit 69bd570 into master Feb 17, 2017
@dpsanders
Copy link
Member

Thanks!

@dpsanders
Copy link
Member

Do you have the ITF1788 tests switched to @testset for the files that are already included (not the new ones)?

lbenet pushed a commit to oheim/ITF1788 that referenced this pull request Mar 5, 2017
ValidatedNumerics was using FactCheck.jl package, but now uses
Base.Test.
See [JuliaIntervals/ValidatedNumerics.jl#205]
@OlivierHnt OlivierHnt deleted the Base.Test branch December 9, 2024 02:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants