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

Fix test failure on Julia 0.7 #33

Merged
merged 2 commits into from
Dec 16, 2017
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Switch to using + instead of cos for test
  • Loading branch information
omus committed Dec 15, 2017
commit 410a20b16a1d6e02eeb162de75c9517b0192f996
12 changes: 5 additions & 7 deletions test/patch.jl
Original file line number Diff line number Diff line change
Expand Up @@ -50,14 +50,12 @@ end
end

@testset "assertion expression" begin
mod = VERSION < v"0.7.0-DEV.2762" ? :(Base.MPFR) : :Base
import_mod = VERSION < v"0.7.0-DEV.2762" ? :(import Base.MPFR) : :(import Base)
p = @patch f(t::typeof(cos)) = nothing
@test p.signature == :(f(t::typeof($mod.cos)))
@test p.modules == Set([:($mod)])
p = @patch f(t::typeof(+)) = nothing
@test p.signature == :(f(t::typeof(Base.:+)))
@test p.modules == Set([:Base])
expected = quote
$import_mod
f(t::typeof($mod.cos)) = $(p.body)(t)
import Base
f(t::typeof(Base.:+)) = $(p.body)(t)
end
@test Mocking.convert(Expr, p) == strip_lineno!(expected)
end
Expand Down