Skip to content

Commit

Permalink
added tests for is.functions.R
Browse files Browse the repository at this point in the history
  • Loading branch information
alecbuetow committed Nov 14, 2024
1 parent 72ae3e1 commit 214b4ac
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions tests/testthat/test-is.functions.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# library(testthat)
# library(dendextend)


context("is.functions")


test_that("is.phylo works", {
dend <- as.dendrogram(hclust(dist(1:5)))
phy <- ape::as.phylo(dend)

expect_true(
is.phylo(phy)
)
})


test_that("fac2num works", {
# if non-factor object passed in
expect_error(
fac2num(1:4)
)
})

0 comments on commit 214b4ac

Please sign in to comment.