[Phylobase-commits] r828 - pkg/inst/unitTests
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Thu Feb 24 17:16:32 CET 2011
Author: francois
Date: 2011-02-24 17:16:31 +0100 (Thu, 24 Feb 2011)
New Revision: 828
Modified:
pkg/inst/unitTests/runit.treewalk.R
Log:
added RUnit test in case of tips labeled 0
Modified: pkg/inst/unitTests/runit.treewalk.R
===================================================================
--- pkg/inst/unitTests/runit.treewalk.R 2011-02-24 16:01:19 UTC (rev 827)
+++ pkg/inst/unitTests/runit.treewalk.R 2011-02-24 16:16:31 UTC (rev 828)
@@ -81,6 +81,13 @@
# node is neither integer-like nor character
checkException(getNode(phytr, 1.5))
+
+ # check that tip labeled as "0" works
+ phyTmp <- phytr
+ tipLabels(phyTmp)[1] <- "0"
+ ans <- 1
+ names(ans) <- "0"
+ checkEquals(getNode(phyTmp, "0"), ans)
}
test.ancestor <- function() {
More information about the Phylobase-commits
mailing list