[Phylobase-commits] r863 - pkg/tests/testthat

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Mon Mar 10 17:49:08 CET 2014


Author: francois
Date: 2014-03-10 17:49:08 +0100 (Mon, 10 Mar 2014)
New Revision: 863

Modified:
   pkg/tests/testthat/test.methods-phylo4.R
Log:
shouldn't be using identical on floating point numbers, replaced with equal.

Modified: pkg/tests/testthat/test.methods-phylo4.R
===================================================================
--- pkg/tests/testthat/test.methods-phylo4.R	2014-03-10 05:39:16 UTC (rev 862)
+++ pkg/tests/testthat/test.methods-phylo4.R	2014-03-10 16:49:08 UTC (rev 863)
@@ -94,15 +94,15 @@
 allDepths <- c(1.2, 1.8, 1.8, 2.1, 2.3, 0.9, 1.0, 1.2, 1.6)
 names(allDepths) <- names(getNode(phy.alt))
 test_that("nodeDepth works without arguments", {
-    expect_identical(nodeDepth(phy.alt), allDepths)
+    expect_equal(nodeDepth(phy.alt), allDepths)
 })
 
 test_that("nodeDepth works with numeric argument", {
-    expect_identical(nodeDepth(phy.alt, 1), allDepths[1])
+    expect_equal(nodeDepth(phy.alt, 1), allDepths[1])
 })
 
 test_that("nodeDepth works with character argument", {          
-    expect_identical(nodeDepth(phy.alt, "t1"), allDepths[1])
+    expect_equal(nodeDepth(phy.alt, "t1"), allDepths[1])
 })
 
 test_that("nodeDepth works with no branch length", {



More information about the Phylobase-commits mailing list