[Dplr-commits] r1049 - in pkg/dplR: . tests/testthat

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Wed Feb 8 13:49:36 CET 2017


Author: mvkorpel
Date: 2017-02-08 13:49:36 +0100 (Wed, 08 Feb 2017)
New Revision: 1049

Modified:
   pkg/dplR/DESCRIPTION
   pkg/dplR/tests/testthat/test-chron.R
   pkg/dplR/tests/testthat/test-dplR.R
Log:
Replace calls to deprecated testthat functions, stay compatible with old R


Modified: pkg/dplR/DESCRIPTION
===================================================================
--- pkg/dplR/DESCRIPTION	2017-02-03 18:13:12 UTC (rev 1048)
+++ pkg/dplR/DESCRIPTION	2017-02-08 12:49:36 UTC (rev 1049)
@@ -3,7 +3,7 @@
 Type: Package
 Title: Dendrochronology Program Library in R
 Version: 1.6.6
-Date: 2017-02-03
+Date: 2017-02-08
 Authors at R: c(person("Andy", "Bunn", role = c("aut", "cph",
         "cre", "trl"), email = "andy.bunn at wwu.edu"), person("Mikko",
         "Korpela", role = c("aut", "trl")), person("Franco", "Biondi",

Modified: pkg/dplR/tests/testthat/test-chron.R
===================================================================
--- pkg/dplR/tests/testthat/test-chron.R	2017-02-03 18:13:12 UTC (rev 1048)
+++ pkg/dplR/tests/testthat/test-chron.R	2017-02-08 12:49:36 UTC (rev 1049)
@@ -38,8 +38,8 @@
     test_that("chron works (with autocorrelation)", {
         expect_equal(res2[["samp.depth"]], threes)
         expect_equal(res2[["xxxstd"]], srs2)
-        expect_more_than(length(which(is.na(res2[["xxxres"]]))), 0)
-        expect_less_than(sd2.2, sd2.1)
+        expect_true(length(which(is.na(res2[["xxxres"]]))) > 0)
+        expect_true(sd2.2 < sd2.1)
     })
 }
 test.chron()

Modified: pkg/dplR/tests/testthat/test-dplR.R
===================================================================
--- pkg/dplR/tests/testthat/test-dplR.R	2017-02-03 18:13:12 UTC (rev 1048)
+++ pkg/dplR/tests/testthat/test-dplR.R	2017-02-08 12:49:36 UTC (rev 1049)
@@ -481,8 +481,8 @@
         expect_equal(res.5, x)
     })
     test_that("smoother spline means more error", {
-        expect_more_than(error.1, error.2)
-        expect_more_than(error.2, error.3)
+        expect_true(error.1 > error.2)
+        expect_true(error.2 > error.3)
     })
     test_that("ffcsaps stops on bad parameters", {
         expect_error(ffcsaps(y, f=-1), "between 0 and 1")



More information about the Dplr-commits mailing list