Skip to content

Commit

Permalink
Avoid inference hang in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
timholy committed Feb 5, 2017
1 parent 329b515 commit 4f1da91
Showing 1 changed file with 14 additions and 10 deletions.
24 changes: 14 additions & 10 deletions test/core.jl
Original file line number Diff line number Diff line change
Expand Up @@ -224,15 +224,19 @@ for C in (A, B)
end
C1t = @inferred(op(C, Axis{:y}))
@test C1t == C1
C2t = @inferred(op(C, Axis{:x}))
@test C2t == C2
C12t = @inferred(op(C, (Axis{:y},Axis{:x})))
@test C12t == C12
C1t = @inferred(op(C, Axis{:y}()))
@test C1t == C1
C2t = @inferred(op(C, Axis{:x}()))
@test C2t == C2
C12t = @inferred(op(C, (Axis{:y}(),Axis{:x}())))
@test C12t == C12
# Julia 0.5.x hangs in inference on the following tests when
# inlining is off. We want this fixed for Julia 0.6.
if VERSION > v"0.6.0-dev.1" || Base.JLOptions().can_inline==1
C2t = @inferred(op(C, Axis{:x}))
@test C2t == C2
C12t = @inferred(op(C, (Axis{:y},Axis{:x})))
@test C12t == C12
C1t = @inferred(op(C, Axis{:y}()))
@test C1t == C1
C2t = @inferred(op(C, Axis{:x}()))
@test C2t == C2
C12t = @inferred(op(C, (Axis{:y}(),Axis{:x}())))
@test C12t == C12
end
end
end

0 comments on commit 4f1da91

Please sign in to comment.