@@ -322,8 +322,8 @@ test_that("tcplPlot works for large comparisons greater than group.threshold mc"
322322 }
323323 )
324324 tcplConf(drvr = " MySQL" , db = " invitrodb" ) # must include both
325- expect_no_error(tcplPlot(type = " mc" , fld = " aeid" , val = mocked $ aeid , compare = " conc_unit " , output = " pdf" , verbose = TRUE , flags = TRUE , multi = TRUE , fileprefix = " temp_tcplPlot" , group.threshold = 8 ))
326- expect_no_error(tcplPlot(type = " mc" , fld = " aeid" , val = mocked $ aeid , compare = " conc_unit " , output = " pdf" , verbose = FALSE , multi = TRUE , flags = TRUE , fileprefix = " temp_tcplPlot" , group.threshold = 8 , group.fld = " model_type" ))
325+ expect_no_error(tcplPlot(type = " mc" , fld = " aeid" , val = mocked $ aeid , compare = " normalized_data_type " , output = " pdf" , verbose = TRUE , flags = TRUE , multi = TRUE , fileprefix = " temp_tcplPlot" , group.threshold = 8 ))
326+ expect_no_error(tcplPlot(type = " mc" , fld = " aeid" , val = mocked $ aeid , compare = " normalized_data_type " , output = " pdf" , verbose = FALSE , multi = TRUE , flags = TRUE , fileprefix = " temp_tcplPlot" , group.threshold = 8 , group.fld = " model_type" ))
327327 fn <- stringr :: str_subset(list.files(), " ^temp_tcplPlot" )
328328 expect_length(fn , 1 ) # exactly one file created
329329 file.remove(fn ) # clean up
@@ -339,8 +339,8 @@ test_that("tcplPlot works for large comparisons greater than group.threshold sc"
339339 }
340340 )
341341 tcplConf(drvr = " MySQL" , db = " invitrodb" ) # must include both
342- expect_no_error(tcplPlot(type = " sc" , fld = " aeid" , val = mocked $ aeid , compare = " conc_unit " , output = " pdf" , verbose = TRUE , multi = TRUE , fileprefix = " temp_tcplPlot" , group.threshold = 12 ))
343- expect_no_error(tcplPlot(type = " sc" , fld = " aeid" , val = mocked $ aeid , compare = " conc_unit " , output = " pdf" , verbose = FALSE , multi = TRUE , fileprefix = " temp_tcplPlot" , group.threshold = 12 , group.fld = " coff" ))
342+ expect_no_error(tcplPlot(type = " sc" , fld = " aeid" , val = mocked $ aeid , compare = " normalized_data_type " , output = " pdf" , verbose = TRUE , multi = TRUE , fileprefix = " temp_tcplPlot" , group.threshold = 12 ))
343+ expect_no_error(tcplPlot(type = " sc" , fld = " aeid" , val = mocked $ aeid , compare = " normalized_data_type " , output = " pdf" , verbose = FALSE , multi = TRUE , fileprefix = " temp_tcplPlot" , group.threshold = 12 , group.fld = " coff" ))
344344 fn <- stringr :: str_subset(list.files(), " ^temp_tcplPlot" )
345345 expect_length(fn , 1 ) # exactly one file created
346346 file.remove(fn ) # clean up
@@ -815,12 +815,13 @@ test_that("loec plotting works for large comparison plot", {
815815 dat <- dat [1 : 4 ]
816816 dat [, c(" modl" , " fitc" , " model_type" , " hitc" , " bmr" , " bmd" , " ac50" ) : = list (" loec" , 100L , 1 , 1 , NA , NA , NA )]
817817 dat $ loec <- c(sort(unlist(dat $ conc ), decreasing = TRUE )[1 : 4 ], rep(NA , nrow(dat ) - 4 ))
818- expect_no_error(tcplPlot(dat = dat , compare = " conc_unit" , output = " pdf" , verbose = TRUE , flags = TRUE , multi = TRUE , fileprefix = " temp_tcplPlot" , group.threshold = 8 ))
819- expect_no_error(tcplPlot(dat = dat , compare = " conc_unit" , output = " pdf" , verbose = TRUE , flags = TRUE , multi = TRUE , fileprefix = " temp_tcplPlot" ))
818+ dat <- rbind(dat , dat_copy [5 : nrow(dat_copy )], fill = TRUE )
819+ expect_no_error(tcplPlot(dat = dat , compare = " normalized_data_type" , output = " pdf" , verbose = TRUE , flags = TRUE , multi = TRUE , fileprefix = " temp_tcplPlot" , group.threshold = 8 ))
820+ expect_no_error(tcplPlot(dat = dat , compare = " normalized_data_type" , output = " pdf" , verbose = TRUE , flags = TRUE , multi = TRUE , fileprefix = " temp_tcplPlot" ))
820821 dat <- dat_copy
821822 dat [, c(" modl" , " fitc" , " model_type" , " hitc" , " bmr" , " bmd" , " ac50" ) : = list (" loec" , 100L , 1 , 1 , NA , NA , NA )]
822823 dat $ loec <- c(sort(unlist(dat $ conc ), decreasing = TRUE )[1 : 4 ], rep(NA , nrow(dat ) - 4 ))
823- expect_no_error(tcplPlot(dat = dat , compare = " conc_unit " , output = " pdf" , verbose = TRUE , flags = TRUE , multi = TRUE , fileprefix = " temp_tcplPlot" , group.threshold = 8 ))
824+ expect_no_error(tcplPlot(dat = dat , compare = " normalized_data_type " , output = " pdf" , verbose = TRUE , flags = TRUE , multi = TRUE , fileprefix = " temp_tcplPlot" , group.threshold = 8 ))
824825 fn <- stringr :: str_subset(list.files(), " ^temp_tcplPlot" )
825826 expect_length(fn , 1 ) # exactly one file created
826827 file.remove(fn ) # clean up
0 commit comments