Skip to content

Commit

Permalink
Ensure test compatibility with Julia 1.6.
Browse files Browse the repository at this point in the history
  • Loading branch information
ztangent committed Mar 19, 2024
1 parent 43c95fc commit f4fd6cf
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions test/resample.jl
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
@test new_lml_est old_lml_est

# Test resampling with invalid weights
with_logger(Logging.SimpleLogger(Logging.Error)) do
with_logger(Logging.SimpleLogger(stderr, Logging.Error)) do
state = pf_initialize(line_model, (0,), slope_choicemap(-3), 100)
@test_throws ErrorException pf_multinomial_resample!(state, check=true)
state = pf_multinomial_resample!(state, check=false)
Expand Down Expand Up @@ -70,7 +70,7 @@ end
@test new_lml_est old_lml_est

# Test resampling with invalid weights
with_logger(Logging.SimpleLogger(Logging.Error)) do
with_logger(Logging.SimpleLogger(stderr, Logging.Error)) do
state = pf_initialize(line_model, (0,), slope_choicemap(-3), 100)
@test_throws ErrorException pf_residual_resample!(state, check=true)
state = pf_residual_resample!(state, check=false)
Expand Down Expand Up @@ -119,7 +119,7 @@ end
@test new_lml_est old_lml_est

# Test resampling with invalid weights
with_logger(Logging.SimpleLogger(Logging.Error)) do
with_logger(Logging.SimpleLogger(stderr, Logging.Error)) do
state = pf_initialize(line_model, (0,), slope_choicemap(-3), 100)
@test_throws ErrorException pf_stratified_resample!(state, check=true)
state = pf_stratified_resample!(state, check=false)
Expand Down
6 changes: 3 additions & 3 deletions test/resize.jl
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
end

# Test resampling with invalid weights
with_logger(Logging.SimpleLogger(Logging.Error)) do
with_logger(Logging.SimpleLogger(stderr, Logging.Error)) do
state = pf_initialize(line_model, (0,), slope_choicemap(-3), 100)
@test_throws ErrorException pf_multinomial_resize!(state, 50, check=true)
state = pf_multinomial_resize!(state, 50, check=false)
Expand Down Expand Up @@ -75,7 +75,7 @@ end
end

# Test resampling with invalid weights
with_logger(Logging.SimpleLogger(Logging.Error)) do
with_logger(Logging.SimpleLogger(stderr, Logging.Error)) do
state = pf_initialize(line_model, (0,), slope_choicemap(-3), 100)
@test_throws ErrorException pf_residual_resize!(state, 50, check=true)
state = pf_residual_resize!(state, 50, check=false)
Expand Down Expand Up @@ -105,7 +105,7 @@ end
end

# Test resampling with invalid weights
with_logger(Logging.SimpleLogger(Logging.Error)) do
with_logger(Logging.SimpleLogger(stderr, Logging.Error)) do
state = pf_initialize(line_model, (0,), slope_choicemap(-3), 100)
@test_throws ErrorException pf_optimal_resize!(state, 50, check=true)
state = pf_optimal_resize!(state, 50, check=false)
Expand Down

2 comments on commit f4fd6cf

@ztangent
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/103136

Tip: Release Notes

Did you know you can add release notes too? Just add markdown formatted text underneath the comment after the text
"Release notes:" and it will be added to the registry PR, and if TagBot is installed it will also be added to the
release that TagBot creates. i.e.

@JuliaRegistrator register

Release notes:

## Breaking changes

- blah

To add them here just re-invoke and the PR will be updated.

Tagging

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v0.2.3 -m "<description of version>" f4fd6cf6cc4361a9aa56dd580a374f8f067658a2
git push origin v0.2.3

Please sign in to comment.