Skip to content

Commit

Permalink
test: allocation test to 0
Browse files Browse the repository at this point in the history
  • Loading branch information
fjebaker committed Oct 1, 2023
1 parent 341f745 commit b9396f9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/fitting/test-cache.jl
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ using SpectralFitting, Test
dummy_data = make_dummy_dataset((E) -> (E^(-3.0)); units = u"counts / (s * keV)")

# test that both julia and xspec implementations can fit simple
model = PhotoelectricAbsorption() * PowerLaw()
model = PhotoelectricAbsorption() * PowerLaw() + PowerLaw() + PowerLaw()

config = SpectralFitting.FittingConfig(model, dummy_data)

Expand All @@ -16,4 +16,4 @@ result = f(domain, params)
# todo: currently we still allocate cus extracting the frozen parameters
# has a dynamic allocation
allocated_bytes = @allocated f(domain, params)
@test allocated_bytes < 400
@test allocated_bytes == 0

0 comments on commit b9396f9

Please sign in to comment.