Skip to content

Commit f4fd6cf

Browse files
committed
Ensure test compatibility with Julia 1.6.
1 parent 43c95fc commit f4fd6cf

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

test/resample.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
@test new_lml_est old_lml_est
2424

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

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

121121
# Test resampling with invalid weights
122-
with_logger(Logging.SimpleLogger(Logging.Error)) do
122+
with_logger(Logging.SimpleLogger(stderr, Logging.Error)) do
123123
state = pf_initialize(line_model, (0,), slope_choicemap(-3), 100)
124124
@test_throws ErrorException pf_stratified_resample!(state, check=true)
125125
state = pf_stratified_resample!(state, check=false)

test/resize.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
end
3030

3131
# Test resampling with invalid weights
32-
with_logger(Logging.SimpleLogger(Logging.Error)) do
32+
with_logger(Logging.SimpleLogger(stderr, Logging.Error)) do
3333
state = pf_initialize(line_model, (0,), slope_choicemap(-3), 100)
3434
@test_throws ErrorException pf_multinomial_resize!(state, 50, check=true)
3535
state = pf_multinomial_resize!(state, 50, check=false)
@@ -75,7 +75,7 @@ end
7575
end
7676

7777
# Test resampling with invalid weights
78-
with_logger(Logging.SimpleLogger(Logging.Error)) do
78+
with_logger(Logging.SimpleLogger(stderr, Logging.Error)) do
7979
state = pf_initialize(line_model, (0,), slope_choicemap(-3), 100)
8080
@test_throws ErrorException pf_residual_resize!(state, 50, check=true)
8181
state = pf_residual_resize!(state, 50, check=false)
@@ -105,7 +105,7 @@ end
105105
end
106106

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

0 commit comments

Comments
 (0)