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

TestSuite.compare does not handle Nothing #272

Open
maleadt opened this issue May 8, 2020 · 0 comments
Open

TestSuite.compare does not handle Nothing #272

maleadt opened this issue May 8, 2020 · 0 comments

Comments

@maleadt
Copy link
Member

maleadt commented May 8, 2020

 findfirst: Error During Test at /builds/JuliaGPU/CuArrays.jl/test/base.jl:313
  Test threw exception
  Expression: testf((x->begin
            findfirst(x)
        end), fill(false, 10))
  MethodError: no method matching length(::Nothing)
  Closest candidates are:
    length(!Matched::Core.SimpleVector) at essentials.jl:593
    length(!Matched::Base.MethodList) at reflection.jl:849
    length(!Matched::Core.MethodTable) at reflection.jl:923
    ...
  Stacktrace:
   [1] _similar_for(::UnitRange{Int64}, ::Type{Any}, ::Nothing, ::Base.HasLength) at ./array.jl:533
   [2] _collect(::UnitRange{Int64}, ::Nothing, ::Base.HasEltype, ::Base.HasLength) at ./array.jl:566
   [3] collect(::Nothing) at ./array.jl:560
   [4] #compare#1(::Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}, ::typeof(Main.TestSuite.compare), ::Function, ::Type{CuArray}, ::Array{Bool,1}) at /builds/JuliaGPU/CuArrays.jl/.julia/packages/GPUArrays/OXvxB/test/testsuite.jl:24
   [5] compare at /builds/JuliaGPU/CuArrays.jl/.julia/packages/GPUArrays/OXvxB/test/testsuite.jl:20 [inlined]
   [6] #testf#3 at /builds/JuliaGPU/CuArrays.jl/test/runtests.jl:18 [inlined]
   [7] testf(::Function, ::Array{Bool,1}) at /builds/JuliaGPU/CuArrays.jl/test/runtests.jl:18
   [8] top-level scope at /builds/JuliaGPU/CuArrays.jl/test/base.jl:313
   [9] top-level scope at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.3/Test/src/Test.jl:1107
   [10] top-level scope at /builds/JuliaGPU/CuArrays.jl/test/base.jl:313

JuliaGPU/CuArrays.jl#712

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant