Skip to content

Commit

Permalink
more cleaning up of tests
Browse files Browse the repository at this point in the history
  • Loading branch information
RWParsons committed Aug 19, 2024
1 parent 0e62f6f commit 2d6d67c
Show file tree
Hide file tree
Showing 11 changed files with 903 additions and 865 deletions.
309 changes: 309 additions & 0 deletions tests/testthat/_snaps/amp-acro.md

Large diffs are not rendered by default.

63 changes: 33 additions & 30 deletions tests/testthat/_snaps/test_cosinor.md
Original file line number Diff line number Diff line change
@@ -1,34 +1,37 @@
# multi-component comparison works, print functions work


Conditional Model

Raw formula:
Y ~ group + group:main_rrr1 + group:main_sss1 + group:main_rrr2 + group:main_sss2

Raw Coefficients:
Code
print(object, digits = 2)
Output
Conditional Model
Raw formula:
Y ~ group + group:main_rrr1 + group:main_sss1 + group:main_rrr2 + group:main_sss2
Raw Coefficients:
Estimate
(Intercept) 1.0
group1 -0.5
group0:main_rrr1 -2.0
group1:main_rrr1 0.9
group0:main_sss1 0.3
group1:main_sss1 0.3
group0:main_rrr2 -2.1
group1:main_rrr2 1.0
group0:main_sss2 0.2
group1:main_sss2 0.3
Transformed Coefficients:
Estimate
(Intercept) 1.0
group1 -0.5
group0:main_rrr1 -2.0
group1:main_rrr1 0.9
group0:main_sss1 0.3
group1:main_sss1 0.3
group0:main_rrr2 -2.1
group1:main_rrr2 1.0
group0:main_sss2 0.2
group1:main_sss2 0.3

Transformed Coefficients:
Estimate
(Intercept) 1.0
[group=1] -0.5
[group=0]:amp1 2.0
[group=1]:amp1 0.9
[group=0]:amp2 2.1
[group=1]:amp2 1.1
[group=0]:acr1 3.0
[group=1]:acr1 0.3
[group=0]:acr2 3.0
[group=1]:acr2 0.3
(Intercept) 1.0
[group=1] -0.5
[group=0]:amp1 2.0
[group=1]:amp1 0.9
[group=0]:amp2 2.1
[group=1]:amp2 1.1
[group=0]:acr1 3.0
[group=1]:acr1 0.3
[group=0]:acr2 3.0
[group=1]:acr2 0.3

11 changes: 11 additions & 0 deletions tests/testthat/helper-amp-acro.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
expect_amp_acro <- function(x) {
lapply(
x,
function(obj) {
if (inherits(obj, "formula")) {
obj <- as.character(obj)
}
expect_snapshot(obj)
}
)
}
Loading

0 comments on commit 2d6d67c

Please sign in to comment.