From 1ba0938b5a39f9d376b54fe3469b40aafea9e8e3 Mon Sep 17 00:00:00 2001 From: Johannes Ranke Date: Tue, 1 Mar 2022 16:59:30 +0100 Subject: Avoid using cat() for default output, tests --- tests/testthat/test_f_time_norm.R | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'tests/testthat/test_f_time_norm.R') diff --git a/tests/testthat/test_f_time_norm.R b/tests/testthat/test_f_time_norm.R index c5e0607c..d5b89902 100644 --- a/tests/testthat/test_f_time_norm.R +++ b/tests/testthat/test_f_time_norm.R @@ -5,13 +5,12 @@ test_that("Simple temperature and moisture normalisation works", { }) test_that("Time step normalisation for a dataset works", { - expect_output(f_time_norm_focus(D24_2014, study_moisture_ref_source = "focus", f_na = 1), - "was set to") + expect_message(f_time_norm_focus(D24_2014, study_moisture_ref_source = "focus", f_na = 1)) expect_equal(round(D24_2014$f_time_norm, 3), c(1.606, 0.712, 0.716, 0.716, 0.898)) - expect_output(f_time_norm_focus(dimethenamid_2018), "was set to") + expect_message(f_time_norm_focus(dimethenamid_2018)) # Reference values from Dimethenamid RAR 2018 Vol3 B.8 - expect_equal(round(dimethenamid_2018$f_time_norm, 3), + expect_equal(round(dimethenamid_2018$f_time_norm, 3), c(1, 0.971, # p. 56 rep(round(1.329 * 0.924, 3), 2), # p. 51 -- cgit v1.2.1