tests/testthat/test-findSibling.R

context("findSibling")

test_that("findSibling could find correct nodes", {
    # data(exTree)
    # x <- 95
    # names(x) <- NA
    # expect_equal(findSibling(tree = exTree, input = 75,
    #                          use.alias = FALSE), x)
    # expect_error(findSibling(tree = exTree, input = 51))
    # expect_equal(findSibling(tree = exTree, input = c(75, 76),
    #                          use.alias = TRUE),
    #              c(Node_95 = 95, Node_85 = 85))
    # expect_equal(findSibling(tree = exTree, input = 40),
    #              c(t14 = 39))
})
markrobinsonuzh/treeAGG documentation built on May 26, 2019, 9:32 a.m.