Skip to content

Commit

Permalink
updating tests
Browse files Browse the repository at this point in the history
  • Loading branch information
shajoezhu committed Dec 5, 2024
1 parent fe2d8ad commit 8643c69
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 48 deletions.
2 changes: 0 additions & 2 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ S3method(to_flextable,dlisting)
export(autoslider_dose_format)
export(autoslider_error)
export(autoslider_format)
export(black_format)
export(blue_format)
export(build_table_header)
export(check_and_set_cutoff)
Expand Down Expand Up @@ -71,7 +70,6 @@ export(t_ds_slide)
export(to_vector)
export(trim_perc)
export(trim_perc1)
export(white_format)
import(assertthat)
import(dplyr)
import(flextable)
Expand Down
35 changes: 0 additions & 35 deletions R/ft_formats.R
Original file line number Diff line number Diff line change
Expand Up @@ -127,38 +127,3 @@ autoslider_dose_format <- function(ft, header_vals = names(ft)) {
bold(part = "header") %>%
border_remove()
}

#' @describeIn autoslider_format
#'
#' White color theme
#'
#' @param ft flextable object
#' @param ... arguments passed to program
#'
#' @export
white_format <- function(ft, ...) {
ft <- do_call(autoslider_dose_format, ft = ft, ...)
ft %>%
color(color = "white", part = "header") %>%
bg(bg = "#0B41CD", part = "header") %>%
border_inner(part = "body", border = fp_border(color = "#F5F5F2")) %>%
border_outer(part = "body", border = fp_border(color = "#F5F5F2"))
}


#' @describeIn autoslider_format
#'
#' Black color theme
#'
#' @param ft flextable object
#' @param ... arguments passed to program
#'
#' @export
black_format <- function(ft, ...) {
ft <- do_call(autoslider_dose_format, ft = ft, ...)
ft %>%
color(color = "blue", part = "header") %>%
border_inner_h(part = "all", border = fp_border(color = "black")) %>%
hline_top(part = "all", border = fp_border(color = "black", width = 2)) %>%
hline_bottom(part = "all", border = fp_border(color = "black", width = 2))
}
15 changes: 15 additions & 0 deletions inst/filters.yml
Original file line number Diff line number Diff line change
Expand Up @@ -148,3 +148,18 @@ FEWSBJ:
condition: SUBJID %in% c("id-267", "id-206", "id-188", "id-389", "id-140")
target: adsl
type: anl
CRP:
title: NA_character_
condition: PARAMCD == "CRP"
target: adlb
type: ref
HR:
title: NA_character_
condition: PARAMCD == "HR"
target: adeg
type: ref
ADSL:
title: NA_character_
condition: 1==1
target: adsl
type: ref
12 changes: 12 additions & 0 deletions inst/spec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -348,3 +348,15 @@
titles: Listing of Laboratory Abnormalities
footnotes: ''
suffix: LBCRP_FEWSBJ_SE
- program: g_vs_slide
titles: ''
footnotes: ''
suffix: ADSL_SYSBP
- program: g_lb_slide
titles: ''
footnotes: ''
suffix: ADSL_CRP
- program: g_eg_slide
titles: ''
footnotes: ''
suffix: ADSL_HR
10 changes: 0 additions & 10 deletions man/autoslider_format.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion tests/testthat/test-srep_outputs.R
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,9 @@ test_that("Listing print correctly", {
"t_tte_slide",
"t_orr_slide",
# "l_dsl01_slide",
"g_mean_slide",
"g_vs_slide",
"g_lab_slide",
"g_eg_slide",
"t_dm_slide",
"t_vs_slide",
"t_ae_summ_slide",
Expand Down

0 comments on commit 8643c69

Please sign in to comment.