diff --git a/tests/testthat/test-high_level_functions.R b/tests/testthat/test-high_level_functions.R index e90647a..e1251f6 100644 --- a/tests/testthat/test-high_level_functions.R +++ b/tests/testthat/test-high_level_functions.R @@ -15,21 +15,12 @@ fin <- system.file("extdata", fout1 <- tempfile() fout2 <- tempfile() +fout3 <- tempfile() test_that("calibrate_carbon returns no error", { skip_on_cran() # these tests could probably be made more useful!! - expect_warning(calibrate_carbon(fin, fout1, "ONAQ", - method = "Bowling_2003", - calibration_half_width = 0.5, - force_cal_to_beginning = TRUE, - force_cal_to_end = TRUE, - gap_fill_parameters = FALSE, - filter_ambient = TRUE, - r2_thres = 0.95, - correct_ref_data = TRUE, - write_to_file = TRUE)) expect_no_error(calibrate_carbon(fin, fout1, "ONAQ", method = "gainoffset", @@ -64,6 +55,17 @@ test_that("calibrate_carbon returns no error", { r2_thres = 0.95, correct_ref_data = TRUE, write_to_file = FALSE)) + + expect_warning(calibrate_carbon(fin, "/dev/null", "ONAQ", + method = "Bowling_2003", + calibration_half_width = 0.5, + force_cal_to_beginning = TRUE, + force_cal_to_end = TRUE, + gap_fill_parameters = FALSE, + filter_ambient = TRUE, + r2_thres = 0.95, + correct_ref_data = TRUE, + write_to_file = FALSE)) })