Skip to content

Commit bdf2c49

Browse files
committed
Update test for 1.8 compatibility.
1 parent 516600a commit bdf2c49

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

test/native.jl

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,21 +14,22 @@ include("definitions/native.jl")
1414
end
1515

1616
@testset "Compilation database" begin
17-
function sqexp(x::Float64)
18-
return exp(x)*exp(x)
17+
@noinline inner(x) = x+1
18+
function outer(x)
19+
return inner(x)
1920
end
2021

21-
job, _ = native_job(sqexp, (Float64,))
22+
job, _ = native_job(outer, (Int,))
2223
ir, meta = GPUCompiler.compile(:llvm, job)
2324

24-
meth = only(methods(sqexp, (Float64,)))
25+
meth = only(methods(outer, (Int,)))
2526

2627
mis = filter(mi->mi.def == meth, keys(meta.compiled))
2728
@test length(mis) == 1
2829

2930
other_mis = filter(mi->mi.def != meth, keys(meta.compiled))
3031
@test length(other_mis) == 1
31-
@test only(other_mis).def in methods(Base.exp)
32+
@test only(other_mis).def in methods(inner)
3233
end
3334

3435
@testset "Advanced database" begin

0 commit comments

Comments
 (0)