Skip to content

Commit

Permalink
Expand tests
Browse files Browse the repository at this point in the history
  • Loading branch information
dm13450 committed Jul 16, 2020
1 parent e8962e8 commit 293f22f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
4 changes: 3 additions & 1 deletion test/sample_parents_test.jl
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@
@testset "Constant Background Rate" begin
inferTests && @inferred HawkesProcesses.sample_parents([1,2,3], 0.5, 0.5, kernelTest)

HawkesProcesses.sample_parents([1,2,3], 0.5, 0.5, kernelTest)
sp = HawkesProcesses.sample_parents([1,2,3], 0.5, 0.5, kernelTest)
@test length(sp) == 4
@test length(sp[1]) == 3
end

@testset "Function Background Rate" begin
Expand Down
5 changes: 4 additions & 1 deletion test/simulate_test.jl
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,10 @@ using Distributions
end
@testset "Hawkes Simulation" begin
kern(x) = pdf.(Distributions.Exponential(1/0.5), x)
testevents = HawkesProcesses.simulate(0.5, 0.5, kern, 1)
testevents = HawkesProcesses.simulate(0.5, 0.5, kern, 10)

@test length(testevents) > 0

inferTests && @inferred HawkesProcesses.simulate(0.5, 0.5, kern, 100)
end

Expand Down

0 comments on commit 293f22f

Please sign in to comment.