-
Notifications
You must be signed in to change notification settings - Fork 57
Expand file tree
/
Copy pathsnoop_all.jl
More file actions
34 lines (25 loc) · 810 Bytes
/
snoop_all.jl
File metadata and controls
34 lines (25 loc) · 810 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
using Test
using SnoopCompile
f(x) = 2^x + 100
@testset "basic snoop_all" begin
# First time not empty
tinf, snoopl_csv, snoopl_yaml, snoopc_csv =
SnoopCompileCore.@snoop_all "snoop_all-f" f(2)
@test length(collect(flatten(tinf))) > 1
@test filesize(snoopl_csv) != 0
@test filesize(snoopl_yaml) != 0
@test filesize(snoopc_csv) != 0
rm(snoopl_csv)
rm(snoopl_yaml)
rm(snoopc_csv)
# Second run is empty because f(x) is already compiled
tinf, snoopl_csv, snoopl_yaml, snoopc_csv =
SnoopCompileCore.@snoop_all "snoop_all-f" f(2)
@test length(collect(flatten(tinf))) == 1
@test filesize(snoopl_csv) == 0
@test filesize(snoopl_yaml) == 0
@test filesize(snoopc_csv) == 0
rm(snoopl_csv)
rm(snoopl_yaml)
rm(snoopc_csv)
end