Skip to content

Commit

Permalink
test for defaults
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexDo1 committed Jun 21, 2024
1 parent 87c50a7 commit 452d8e6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tests/testthat/test-get_parameters.R
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,12 @@ test_that("parse parameters works", {
params <- get_parameters()

# test parsed parameters
testthat::expect_length(params, 6)
testthat::expect_length(params, 7)
testthat::expect_equal(params$foo_int, 42)
testthat::expect_type(params$foo_int, "integer")
testthat::expect_type(params$foo_string, "character")
testthat::expect_type(params$foo_float, "double")
testthat::expect_length(params$foo_array, 5)
testthat::expect_type(params$foo_boolean, "logical")
testthat::expect_equal(params$foo_default_int, 3)
})
4 changes: 4 additions & 0 deletions tests/testthat/testdata/src/tool.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ tools:
array: true
foo_boolean:
type: boolean
foo_default_int:
type: integer
default: 3
optional: false
data:
foo_matrix:
type: file
Expand Down

0 comments on commit 452d8e6

Please sign in to comment.