[Phylobase-commits] r941 - in pkg: inst/unitTests tests/testthat

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Wed May 7 16:58:41 CEST 2014


Author: francois
Date: 2014-05-07 16:58:41 +0200 (Wed, 07 May 2014)
New Revision: 941

Added:
   pkg/tests/testthat/test.prune.R
Removed:
   pkg/inst/unitTests/runit.prune.R
Log:
moved/converted prune tests

Deleted: pkg/inst/unitTests/runit.prune.R
===================================================================
--- pkg/inst/unitTests/runit.prune.R	2014-05-07 14:58:18 UTC (rev 940)
+++ pkg/inst/unitTests/runit.prune.R	2014-05-07 14:58:41 UTC (rev 941)
@@ -1,16 +0,0 @@
-#
-# --- Test prune.R ---
-#
-
-data(geospiza)
-gtree <- extractTree(geospiza)
-
-test.prune.phylo4 <- function() {
-    # function(phy, tip, trim.internal = TRUE, subtree = FALSE, ...)
-    checkIdentical(gtree, prune(gtree, character(0)))
-}
-
-test.prune.phylo4d <- function() {
-    # function(phy, tip, trim.internal = TRUE, subtree = FALSE, ...)
-    checkIdentical(geospiza, prune(geospiza, character(0)))
-}

Copied: pkg/tests/testthat/test.prune.R (from rev 880, pkg/inst/unitTests/runit.prune.R)
===================================================================
--- pkg/tests/testthat/test.prune.R	                        (rev 0)
+++ pkg/tests/testthat/test.prune.R	2014-05-07 14:58:41 UTC (rev 941)
@@ -0,0 +1,18 @@
+#
+# --- Test prune.R ---
+#
+
+data(geospiza)
+gtree <- extractTree(geospiza)
+
+context("prune")
+
+test_that("prune works on phylo4 objects", {
+    # function(phy, tip, trim.internal = TRUE, subtree = FALSE, ...)
+    expect_equal(gtree, prune(gtree, character(0)))
+})
+
+test_that("prune works on phylo4d objects", {
+    # function(phy, tip, trim.internal = TRUE, subtree = FALSE, ...)
+    expect_equal(geospiza, prune(geospiza, character(0)))
+})



More information about the Phylobase-commits mailing list