Skip to content

Commit 8bf2aca

Browse files
committed
build out the test a bit
1 parent 1abc1fb commit 8bf2aca

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

stdlib/AllocProfile/src/AllocProfile.jl

-1
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,6 @@ end
8888

8989
function decode_alloc(cache::BacktraceCache, raw_alloc::RawAlloc)::Alloc
9090
bt, bt2 = decode_backtrace(raw_alloc.backtrace.data, raw_alloc.backtrace.size)
91-
# @show bt2
9291
Alloc(
9392
load_type(raw_alloc.type),
9493
stacktrace_memoized(cache, _reformat_bt(bt, bt2)),

stdlib/AllocProfile/test/runtests.jl

+8-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
1-
# using Pkg; Pkg.activate("stdlib/AllocProfile")
1+
# TODO: register AllocProfile in the stdlib
2+
using Pkg; Pkg.activate("stdlib/AllocProfile")
3+
4+
using Test
5+
26
using AllocProfile
37

48
@testset "alloc profiler doesn't segfault" begin
@@ -8,6 +12,7 @@ using AllocProfile
812
using Base64
913

1014
raw_results = AllocProfile.stop()
11-
12-
# TODO: assert something about the results
15+
results = AllocProfile.decode(raw_results)
16+
17+
@test length(results.allocs) > 0
1318
end

0 commit comments

Comments
 (0)