Skip to content

Commit

Permalink
1839 dummy function
Browse files Browse the repository at this point in the history
  • Loading branch information
PavloChaika committed Apr 12, 2023
1 parent ecf4eb6 commit 211409b
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 0 deletions.
23 changes: 23 additions & 0 deletions R/my_first_fcn.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#' Derive Extension Example #'
#' Says hello admiral
#'
#' @param hw TRUE or FALSE
#'
#' @author Open Source
#' @details Something Something
#'
#' @return Happy Message
#'
#' @family der_adxx
#' @keywords der_adxx
#' @export
#' @examples
#' hello_admiral(hw = FALSE)
#'
hello_admiral <- function (hw = TRUE) {
if (hw) {
message ("Welcome to the admiral family!") }
else {
message ("Welcome to the admiral family!")
}
}
13 changes: 13 additions & 0 deletions R/test-my_first_fcn.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
test_that ("hello admiral greets without hw", {
expect_message(
hello_admiral(),
"^Welcome to the admiral family!\\n"
)
})

test_that ("hello admiral greets with hw", {
expect_message(
hello_admiral(TRUE),
"^Welcome to the admiral family!\\n"
)
})

0 comments on commit 211409b

Please sign in to comment.