-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Small additions to thermochronometry docs and uniform function name.
- Loading branch information
Showing
6 changed files
with
41 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
13 changes: 7 additions & 6 deletions
13
man/fit_IsoThermalHolding.Rd → man/fit_IsothermalHolding.Rd
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
17 changes: 9 additions & 8 deletions
17
tests/testthat/test_fit_IsoThermalHolding.R → tests/testthat/test_fit_IsothermalHolding.R
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,31 @@ | ||
## load data | ||
input.csv <- file.path(test_path("_data"), | ||
paste0("CLBR_IR", c(50, 100, 150, 225), ".csv")) | ||
|
||
test_that("input validation", { | ||
testthat::skip_on_cran() | ||
|
||
expect_error(fit_IsoThermalHolding(list()), | ||
expect_error(fit_IsothermalHolding(list()), | ||
"'data' should be of class 'character', 'RLum.Results' or") | ||
expect_error(fit_IsoThermalHolding("error"), | ||
expect_error(fit_IsothermalHolding("error"), | ||
"File does not exist") | ||
expect_error(fit_IsoThermalHolding(set_RLum("RLum.Results", data = list(1))), | ||
expect_error(fit_IsothermalHolding(set_RLum("RLum.Results", data = list(1))), | ||
"'data' has unsupported originator") | ||
expect_error(fit_IsoThermalHolding(iris), | ||
expect_error(fit_IsothermalHolding(iris), | ||
"'data' has the wrong column headers") | ||
expect_error(fit_IsoThermalHolding(input.csv[1], ITL_model = "error"), | ||
expect_error(fit_IsothermalHolding(input.csv[1], ITL_model = "error"), | ||
"'ITL_model' should be one of 'GOK' or 'BTS'") | ||
expect_error(fit_IsoThermalHolding(test_path("_data/CLBR.xlsx")), | ||
expect_error(fit_IsothermalHolding(test_path("_data/CLBR.xlsx")), | ||
"XLS/XLSX format is not supported, use CSV instead") | ||
}) | ||
|
||
test_that("check functionality", { | ||
testthat::skip_on_cran() | ||
|
||
expect_s4_class(fit_IsoThermalHolding(input.csv[1], rhop = -7), | ||
expect_s4_class(fit_IsothermalHolding(input.csv[1], rhop = -7), | ||
"RLum.Results") | ||
|
||
data <- .import_ThermochronometryData(input.csv[1]) | ||
expect_s4_class(fit_IsoThermalHolding(data, rhop = -7, mfrow = c(2, 2)), | ||
expect_s4_class(fit_IsothermalHolding(data, rhop = -7, mfrow = c(2, 2)), | ||
"RLum.Results") | ||
}) |