Skip to content

Commit c07cd33

Browse files
fixed tests to use messages
1 parent 28e35f3 commit c07cd33

2 files changed

Lines changed: 2 additions & 3 deletions

File tree

tests/testthat/test-insertEven.R

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ test_that("evenInsert inserts elements of m into n when m < n", {
3232
# Test Case 5: Verbose mode
3333
test_that("Verbose mode work for evenInsert", {
3434
# skip_on_cran(message = "Skipping test that only checks for verbose output")
35-
expect_output(evenInsert(1:3, 4:6, verbose = TRUE),
35+
expect_messsage(evenInsert(1:3, 4:6, verbose = TRUE),
3636
regexp = "1 2 3 \\n1 2 3 \\n1 2 3 \\n4 5 6 "
3737
)
3838
})
@@ -43,6 +43,5 @@ test_that("evenInsert handles vectors of equal length correctly", {
4343
result_observed <- evenInsert(1:3, 4:6)
4444
result_expected <- c(1, 4, 2, 5, 3, 6)
4545

46-
4746
expect_equal(result_observed, result_expected)
4847
})

tests/testthat/test-simulatePedigree.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,5 +25,5 @@ test_that("simulatePedigree verbose prints updates", {
2525
sexR <- .50
2626
marR <- .7
2727

28-
expect_output(simulatePedigree(kpc = kpc, Ngen = Ngen, sexR = sexR, marR = marR, verbose = TRUE), regexp = "Let's build the connection within each generation first")
28+
expect_message(simulatePedigree(kpc = kpc, Ngen = Ngen, sexR = sexR, marR = marR, verbose = TRUE), regexp = "Let's build the connection within each generation first")
2929
})

0 commit comments

Comments
 (0)