From f4fd6cf6cc4361a9aa56dd580a374f8f067658a2 Mon Sep 17 00:00:00 2001 From: Xuan Date: Mon, 18 Mar 2024 21:21:56 -0400 Subject: [PATCH] Ensure test compatibility with Julia 1.6. --- test/resample.jl | 6 +++--- test/resize.jl | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/test/resample.jl b/test/resample.jl index 72040c9..90b249d 100644 --- a/test/resample.jl +++ b/test/resample.jl @@ -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) @@ -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) @@ -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) diff --git a/test/resize.jl b/test/resize.jl index 06223ce..95b7b0a 100644 --- a/test/resize.jl +++ b/test/resize.jl @@ -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) @@ -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) @@ -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)