diff options
author | Johannes Ranke <jranke@uni-bremen.de> | 2020-03-27 11:47:48 +0100 |
---|---|---|
committer | Johannes Ranke <jranke@uni-bremen.de> | 2020-03-27 11:47:48 +0100 |
commit | 20ece4e0bcbeceb90a940e04a858f4ffb6d6b5e4 (patch) | |
tree | 7595dbb6e129332a6ad0c273ecd3fbd92643e0d5 /tests/testthat/test_aw.R | |
parent | 731dd9450f08868140f90af7a305133ec9342994 (diff) | |
parent | 68eed166cbe10a5ee79f5b1139261dea98234b22 (diff) |
Merge branch 'master' into mxkin
Diffstat (limited to 'tests/testthat/test_aw.R')
-rw-r--r-- | tests/testthat/test_aw.R | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/testthat/test_aw.R b/tests/testthat/test_aw.R new file mode 100644 index 00000000..0a493893 --- /dev/null +++ b/tests/testthat/test_aw.R @@ -0,0 +1,12 @@ +context("Calculation of Akaike weights") + +test_that("Akaike weights sum to one", { + skip_on_cran() + aw_1 <- aw(fit_nw_1, fit_obs_1, fit_tc_1) + expect_error(aw(fit_nw_1, f_2_mkin), "same data") + expect_error(aw(fit_nw_1, 3), "mkinfit objects") + expect_equal(sum(aw_1), 1) + aw_2 <- aw(fits[c("SFO", "DFOP"), "FOCUS_D"]) + expect_equal(sum(aw_2), 1) + expect_error(aw(fits), "mmkin column object") +}) |