Skip to content

Commit

Permalink
Fixup test typo
Browse files Browse the repository at this point in the history
  • Loading branch information
NHDaly committed Oct 21, 2023
1 parent 47b92a3 commit 2a789ae
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions test/PProf.jl
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,8 @@ end
end
end


const HAS_META = isdefined(Profile, :has_meta)
@testset "with_c" begin
Profile.clear()

Expand All @@ -110,28 +112,28 @@ end
end
@testset for i in 1:4
if i == 1
if !Profile.has_meta
if !HAS_META
continue
end
data = Profile.fetch(include_meta = true)
args = (data,)
elseif i == 2
if !Profile.has_meta
if !HAS_META
continue
end
data,lidict = Profile.retrieve(include_meta = true)
args = (data, lidict)
elseif i == 3
# Ensure we are backwards compatible with older, non-meta profiles
if Profile.has_meta
if HAS_META
data = Profile.fetch(include_meta = false)
else
data = Profile.fetch()
end
args = (data,)
else
# Ensure we are backwards compatible with older, non-meta profiles
if Profile.has_meta
if HAS_META
data,lidict = Profile.retrieve(include_meta = false)
else
data,lidict = Profile.retrieve()
Expand Down

0 comments on commit 2a789ae

Please sign in to comment.