aboutsummaryrefslogtreecommitdiff
path: root/tests/testthat/test_SFORB.R
diff options
context:
space:
mode:
authorJohannes Ranke <jranke@uni-bremen.de>2020-04-22 16:09:53 +0200
committerJohannes Ranke <jranke@uni-bremen.de>2020-04-22 18:01:26 +0200
commitae4ca17b89047052b35acee8e636ff8f31636c13 (patch)
tree8d44949bc8b2a2c23a2e2896e12ff438252a1fe5 /tests/testthat/test_SFORB.R
parentf6b6ecd0f925799aaced3fb5ceb9e5817a99d884 (diff)
Support SFORB with formation fractions
Diffstat (limited to 'tests/testthat/test_SFORB.R')
-rw-r--r--tests/testthat/test_SFORB.R18
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/testthat/test_SFORB.R b/tests/testthat/test_SFORB.R
index b168a4ee..ad9881a8 100644
--- a/tests/testthat/test_SFORB.R
+++ b/tests/testthat/test_SFORB.R
@@ -9,4 +9,22 @@ test_that("Fitting the SFORB model is equivalent to fitting DFOP", {
expect_match(s_sforb, "Estimated Eigenvalues of SFORB model\\(s\\):")
expect_match(s_sforb, "parent_b1 parent_b2")
expect_match(s_sforb, "0.45956 *0.01785")
+
+ DFOP_SFO <- mkinmod(parent = mkinsub("DFOP", "M1"),
+ M1 = mkinsub("SFO"),
+ use_of_ff = "max", quiet = TRUE)
+ SFORB_SFO <- mkinmod(parent = mkinsub("SFORB", "M1"),
+ M1 = mkinsub("SFO"),
+ use_of_ff = "max", quiet = TRUE)
+
+ SFORB_SFO$coefmat
+
+ f_dfop_sfo <- mkinfit(DFOP_SFO, DFOP_par_c, quiet = TRUE)
+ f_sforb_sfo <- mkinfit(SFORB_SFO, DFOP_par_c, quiet = TRUE)
+ f_sforb_sfo_eigen <- mkinfit(SFORB_SFO, DFOP_par_c, solution_type = "eigen", quiet = TRUE)
+
+ expect_equivalent(endpoints(f_sforb_sfo)$distimes, endpoints(f_dfop_sfo)$distimes,
+ tolerance = 1e-6)
+ expect_equivalent(endpoints(f_sforb_sfo_eigen)$distimes, endpoints(f_dfop_sfo)$distimes,
+ tolerance = 1e-6)
})

Contact - Imprint