tests/testthat/test-report.R

context('Report')
test_that("report components are correct", {
    skip_on_cran()
    report_cmp_1 <- get_report_components(gplm.fit,type=1)
    t_report_cmp_1 <- get_report_components(t_obj,type=1)
    t_report_cmp_2 <- get_report_components(t_obj,type=2)
    expect_equal(names(report_cmp_1),c('main_page_plots','main_page_table','p_mat_list','obj_class'))
    expect_equal(names(t_report_cmp_1),c('main_page_plots','main_page_table','p_mat_list','obj_class'))
    expect_equal(names(t_report_cmp_2),c('main_page_plots','main_page_table','mcmc_hist_list','mcmc_table','tour_table','dev_boxplot','tournament_results','conv_diag_plots'))
    expect_equal(report_cmp_1$obj_class,'gplm')
    expect_equal(t_report_cmp_1$obj_class,class(t_obj$winner))
})

Try the bdrc package in your browser

Any scripts or data that you put into this service are public.

bdrc documentation built on March 31, 2023, 11:41 p.m.