BioJulia / IntervalTrees.jl

A data structure for efficient manipulation of sets of intervals
MIT License
44 stars 17 forks source link

Failing test: Interval Intersection #49

Open yakir12 opened 5 years ago

yakir12 commented 5 years ago
               _
   _       _ _(_)_     |  Documentation: https://docs.julialang.org
  (_)     | (_) (_)    |
   _ _   _| |_  __ _   |  Type "?" for help, "]?" for Pkg help.
  | | | | | | |/ _` |  |
  | | |_| | | | (_| |  |  Version 1.1.0 (2019-01-21)
 _/ |\__'_|_|_|\__'_|  |  
|__/                   |

julia> using IntervalTrees

(v1.1) pkg> status IntervalTrees
    Status `~/.julia/environments/v1.1/Project.toml`
  [524e6230] IntervalTrees v1.0.0

(v1.1) pkg> test IntervalTrees
   Testing IntervalTrees
    Status `/tmp/tmpt99mA1/Manifest.toml`
  [524e6230] IntervalTrees v1.0.0
  [2a0f44e3] Base64  [`@stdlib/Base64`]
  [8ba89e20] Distributed  [`@stdlib/Distributed`]
  [b77e0a4c] InteractiveUtils  [`@stdlib/InteractiveUtils`]
  [56ddb016] Logging  [`@stdlib/Logging`]
  [d6f4376e] Markdown  [`@stdlib/Markdown`]
  [de0858da] Printf  [`@stdlib/Printf`]
  [9abbd945] Profile  [`@stdlib/Profile`]
  [9a3f8284] Random  [`@stdlib/Random`]
  [9e88b42a] Serialization  [`@stdlib/Serialization`]
  [6462fe0b] Sockets  [`@stdlib/Sockets`]
  [8dfed614] Test  [`@stdlib/Test`]
  [4ec0a83e] Unicode  [`@stdlib/Unicode`]
Test Summary:            | Pass  Total
Convert and constructors |    8      8
Test Summary: | Pass  Total
Getters       |    5      5
Test Summary: | Pass  Total
Search        |   11     11
Test Summary: | Pass  Total
Iteration     |    5      5
Interval Intersection: Test Failed at /home/yakir/.julia/packages/IntervalTrees/wh2ex/test/runtests.jl:331
  Expression: !((IntervalTrees.firstintersection(t.root, Interval(4, 4), Interval(2, 2)))[1] === nothing)
Stacktrace:
 [1] top-level scope at /home/yakir/.julia/packages/IntervalTrees/wh2ex/test/runtests.jl:331
 [2] top-level scope at /build/julia/src/julia-1.1.0/usr/share/julia/stdlib/v1.1/Test/src/Test.jl:1083
 [3] top-level scope at /home/yakir/.julia/packages/IntervalTrees/wh2ex/test/runtests.jl:242
Test Summary:         | Pass  Fail  Total
Interval Intersection |   16     1     17
ERROR: LoadError: Some tests did not pass: 16 passed, 1 failed, 0 errored, 0 broken.
in expression starting at /home/yakir/.julia/packages/IntervalTrees/wh2ex/test/runtests.jl:240
ERROR: Package IntervalTrees errored during testing
karanbudhraja-tgen commented 4 years ago

I wonder if this is related to a problem that I faced with hasintersection because of line 1100. When the keys operation on one of the children of the root node returns as empty, trying to extract the first element causes BoundError. We should not be processing empty children.