Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closes #1839 Add program and unit test #2591

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
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
3 changes: 3 additions & 0 deletions R/my_first_fcn.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
my_first_fcn <- function(hw = TRUE) {
vbshuliar marked this conversation as resolved.
Show resolved Hide resolved
vbshuliar marked this conversation as resolved.
Show resolved Hide resolved
"Welcome to the admiral family!"
}
8 changes: 8 additions & 0 deletions tests/testthat/test-my_first_fcn.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
## Test 1: Veryfying the message function works fine and prints out the message ----
test_that("multiplication works", {
vbshuliar marked this conversation as resolved.
Show resolved Hide resolved
expected_output <- "Welcome to the admiral family!"

actual_output <- my_first_fcn()

expect_equal(expected_output, actual_output)
})
Loading