-
Notifications
You must be signed in to change notification settings - Fork 33
Remove testapprox
dependency and Reduce the number of test cases for display (#133)
#135
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
Conversation
I guess this is caused by the outmost test group FixedPointNumbers.jl/test/runtests.jl Lines 5 to 10 in 70ae1d6
If I understand it correctly, For simple things like this, it's all okay here. Just breaking this function and doing copy&paste things doesn't look good to me...😢 |
I generally agree with you. However, the function is not a so-called utility function and is nothing but an implementation of tests. This is off topic, but I think that sharing the implementation should be prioritized over sharing the test. |
It makes sense. I don't have a strong opinion on this, and just want to point out an alternative here. I believe you're aware of what you're doing. 😄 Thank you for digging into the details and taking care of this package. P.S. I don't have a solid CS background, and most of the issues you found are really out of my abilities so I'm afraid I can't give many informative comments to help. 😢 |
I am a little educated in electrics, but not educated in computer science or image processing.:sweat_smile:
As a matter of fact, I have not clarified the cause. I got tired of seeing "Error During Test at test/normed.jl" while debugging, but have never seen the "UndefVarError" on my x86 machines.
https://docs.julialang.org/en/v1/manual/variables-and-scoping/ Of course, whatever the cause, your alternative plan should solve the problem correctly! |
Hmmm, yes it is, but here I think it's # test.jl
using Test
@testset "Foo" begin
function foo(x)
println(x)
return x
end
foo(1)
end
foo(2)
» julia --startup=no test.jl
1
Test Summary: |
Foo | No tests
ERROR: LoadError: UndefVarError: foo not defined
Stacktrace:
[1] top-level scope at /Users/jc/Desktop/test.jl:11
[2] include at ./boot.jl:328 [inlined]
[3] include_relative(::Module, ::String) at ./loading.jl:1094
[4] include(::Module, ::String) at ./Base.jl:31
[5] exec_options(::Base.JLOptions) at ./client.jl:295
[6] _start() at ./client.jl:464
in expression starting at /Users/jc/Desktop/test.jl:11 However, if we follow the same structure and use # runtest.jl
using Test
@testset "Foo" begin
include("foo.jl")
end
foo(2) # foo.jl
function foo(x)
println(x)
return x
end
@test foo(1)==1 » julia --startup=no runtest.jl
1
Test Summary: | Pass Total
Foo | 1 1
2 I'm confused about this now, although this is off-topic. |
I am sorry for misleading you. |
I submitted a new issue #139, but this PR is not staled. You may merge or close this PR if you want to. |
Thanks! |
This fixes #133.
This does not change the actual test cases except one wraparound case, and also does not change
testtrunc
.