Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions tests/testthat/helper-custom-expectations.R
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ expect_call_compilation <- function(constructor_call) {
#' @param ... arguments passed to mod$compile()
expect_no_recompilation <- function(mod, ...) {
if(length(mod$exe_file()) == 0 || !file.exists(mod$exe_file())) {
fail(sprint("Model executable '%s' does not exist, cannot test if recompilation is triggerred.", mod$exe_file()))
fail(sprint("Model executable '%s' does not exist, cannot test if recompilation is triggered.", mod$exe_file()))
}

before_mtime <- file.mtime(mod$exe_file())
Expand Down Expand Up @@ -128,7 +128,7 @@ expect_equal_ignore_order <- function(object, expected, ...) {

expect_not_true <- function(...) expect_false(isTRUE(...))

# strips numeric values (which may change slightly with different hardware or compilers)
# strips numeric values (which may change slightly with different hardware or compilers)
# allowing us to still verify names, ordering, column headers, row counts, etc.
transform_print_snapshot <- function(x) {
vapply(x, function(line) {
Expand Down
2 changes: 1 addition & 1 deletion tests/testthat/test-data.R
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,7 @@ test_that("process_data() errors on missing variables", {
expect_type(v, "character")
})

test_that("process_data() corrrectly casts integers and floating point numbers", {
test_that("process_data() correctly casts integers and floating point numbers", {
stan_file <- write_stan_file("
data {
int a;
Expand Down
2 changes: 1 addition & 1 deletion tests/testthat/test-fit-gq.R
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ PARAM_NAMES <- c("y_rep[1]", "y_rep[2]", "y_rep[3]", "y_rep[4]", "y_rep[5]",
"y_rep[6]", "y_rep[7]", "y_rep[8]", "y_rep[9]", "y_rep[10]",
"sum_y")

test_that("draws() stops for unkown variables", {
test_that("draws() stops for unknown variables", {
expect_error(
fit_gq$draws(variables = "ABCD"),
"Can't find the following variable(s) in the output: ABCD",
Expand Down
6 changes: 3 additions & 3 deletions tests/testthat/test-fit-mcmc.R
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ fit_mcmc_fixed_param <- testing_fit("logistic", method = "sample",
refresh = 0, fixed_param = TRUE)
PARAM_NAMES <- c("alpha", "beta[1]", "beta[2]", "beta[3]")

test_that("draws() stops for unkown variables", {
test_that("draws() stops for unknown variables", {
expect_error(
draws_betas <- fit_mcmc$draws(variables = "ABCD"),
"Can't find the following variable(s) in the output: ABCD",
Expand Down Expand Up @@ -279,7 +279,7 @@ test_that("inc_warmup in draws() works with a single chain", {
expect_equal(dim(y3), c(10000, 1, 6))
})

test_that("output() shows informational messages depening on show_messages", {
test_that("output() shows informational messages depending on show_messages", {
fit_info_msg <- testing_fit("info_message")
expect_output(
fit_info_msg$output(1),
Expand Down Expand Up @@ -338,7 +338,7 @@ test_that("loo method works with moment-matching", {
expect_no_warning(fit$loo(moment_match = TRUE, k_threshold=0.4))
})

test_that("loo errors if it can't find log lik variables", {
test_that("loo errors if it can't find log like variables", {
skip_if_not_installed("loo")
fit_schools <- testing_fit("schools")
expect_error(
Expand Down
2 changes: 1 addition & 1 deletion tests/testthat/test-fit-shared.R
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@ test_that("output and latent dynamics files are cleaned up correctly", {
}
})

test_that("CmdStanArgs erorrs if idx is out of proc_ids range", {
test_that("CmdStanArgs errors if idx is out of proc_ids range", {
data_file <- test_path("resources", "data", "bernoulli.data.json")
mod <- testing_model("bernoulli")
arg <- CmdStanArgs$new(
Expand Down
2 changes: 1 addition & 1 deletion tests/testthat/test-model-compile.R
Original file line number Diff line number Diff line change
Expand Up @@ -789,7 +789,7 @@ test_that("cmdstan_model works with user_header", {
)
})

test_that("cmdstan_model cpp_options dont captialize cxxflags ", {
test_that("cmdstan_model cpp_options dont capitalize cxxflags ", {
file <- file.path(cmdstan_path(), "examples", "bernoulli", "bernoulli.stan")
cpp_options <- list(
"CXXFLAGS_OPTIM += -Dsomething_not_used"
Expand Down
2 changes: 1 addition & 1 deletion tests/testthat/test-model-sample.R
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ test_that("sample() method runs when the stan file is removed", {
)
})

test_that("sample() prints informational messages depening on show_exceptions", {
test_that("sample() prints informational messages depending on show_exceptions", {
mod_info_msg <- testing_model("info_message")
expect_sample_output(
expect_message(
Expand Down
Loading