Skip to content

Commit

Permalink
Profile name ordering
Browse files Browse the repository at this point in the history
  • Loading branch information
andrjohns committed May 16, 2024
1 parent d72310f commit 1397b14
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions tests/testthat/test-profiling.R
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@ test_that("profiling works if profiling data is present", {
profiles <- fit$profiles()
expect_equal(length(profiles), 4)
expect_equal(dim(profiles[[1]]), c(3,9))
expect_equal(profiles[[1]][,"name"], c("udf", "priors", "glm"))
for (name in profiles[[1]][,"name"]) {
expect_true(name %in% c("udf", "priors", "glm"))
}

file.remove(fit$profile_files())
expect_error(
Expand All @@ -24,7 +26,9 @@ test_that("profiling works if profiling data is present", {
profiles_no_csv <- fit$profiles()
expect_equal(length(profiles_no_csv), 4)
expect_equal(dim(profiles_no_csv[[1]]), c(3,9))
expect_equal(profiles_no_csv[[1]][,"name"], c("udf", "priors", "glm"))
for (name in profiles_no_csv[[1]][,"name"]) {
expect_true(name %in% c("udf", "priors", "glm"))
}
})

test_that("profiling errors if no profiling files are present", {
Expand Down

0 comments on commit 1397b14

Please sign in to comment.