Skip to content

Commit

Permalink
use @ static for version check
Browse files Browse the repository at this point in the history
  • Loading branch information
kleinschmidt committed Apr 19, 2018
1 parent 643bc8c commit bc8c314
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions test/deprecated.jl
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
@testset "Deprecations" begin
f = @formula y ~ 1 + a*b

if VERSION > v"0.7.0-DEV"
testex = :(@test_logs (:warn, r"Formula\(lhs, rhs\) is deprecated") Formula($f.lhs, $f.rhs))
@static if VERSION > v"0.6.9999"
f2 = @test_logs (:warn, r"Formula\(lhs, rhs\) is deprecated") Formula(f.lhs, f.rhs)
else
testex = :(@test_warn "deprecated" Formula($f.lhs, $f.rhs))
f2 = @test_warn "deprecated" Formula(f.lhs, f.rhs)
end
f2 = eval(testex)
@test f2.lhs == f.lhs
@test f2.rhs == f.rhs
@test f2.ex == f.ex
Expand Down

0 comments on commit bc8c314

Please sign in to comment.