Skip to content

Commit

Permalink
a unit test for as_MonoClust()
Browse files Browse the repository at this point in the history
  • Loading branch information
vinhtantran committed Feb 14, 2021
1 parent 5fcbbe0 commit 7f1aa6e
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tests/testthat.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
library(testthat)
library(monoClust)

test_check("monoClust")
7 changes: 7 additions & 0 deletions tests/testthat/test-as_monoclust.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
test_that("print error when coercing wrong class to MonoClust class", {
testthat::expect_warning({
a <- list(test = 1:3)
as_MonoClust(a)
},
"as_MonoClust does not know how to handle object of class list.")
})

0 comments on commit 7f1aa6e

Please sign in to comment.