Skip to content

Commit

Permalink
Fixed test on weight argument of estim_param
Browse files Browse the repository at this point in the history
  • Loading branch information
sbuis committed Dec 15, 2023
1 parent 500345c commit 24e97e4
Showing 1 changed file with 0 additions and 32 deletions.
32 changes: 0 additions & 32 deletions tests/testthat/test-estim_param.R
Original file line number Diff line number Diff line change
Expand Up @@ -632,15 +632,6 @@ test_that("Test use of WLS, weight equal to Inf", {
})
## test incorrect format for weight function
w0 <- 1
w1 <- function(arg1) {
return(1)
}
w2 <- function(...) {
return(TRUE)
}
w3 <- function(obs, ...) {
return(rep(1,length(obs)+1))
}
test_that("Test use of wls: error is caught for incorrect format of weight", {
expect_error(estim_param(obs_list=obs_synth,
crit_function = crit_wls,
Expand All @@ -649,27 +640,4 @@ test_that("Test use of wls: error is caught for incorrect format of weight", {
optim_options=optim_options,
param_info=param_info,
weight = w0))
expect_error(estim_param(obs_list=obs_synth,
crit_function = crit_wls,
model_function=SticsOnR::stics_wrapper,
model_options=model_options,
optim_options=optim_options,
param_info=param_info,
weight = w1))
expect_error(estim_param(obs_list=obs_synth,
crit_function = crit_wls,
model_function=SticsOnR::stics_wrapper,
model_options=model_options,
optim_options=optim_options,
param_info=param_info,
weight = w2))
expect_error(estim_param(obs_list=obs_synth,
crit_function = crit_wls,
model_function=SticsOnR::stics_wrapper,
model_options=model_options,
optim_options=optim_options,
param_info=param_info,
weight = w3))
})


0 comments on commit 24e97e4

Please sign in to comment.