@@ -44,6 +44,7 @@ test_that("probabilities (vector) are adjusted as documented.", {
4444})
4545
4646test_that(" genCatFormula throws errors." , {
47+ skip_on_cran()
4748 expect_error(genCatFormula(), " Need to specify" )
4849 expect_error(genCatFormula(1 , 2 , 3 , n = 5 ), " or n, not both" )
4950 expect_error(genCatFormula(1.1 ), " must be less than 1" )
@@ -53,16 +54,19 @@ test_that("genCatFormula throws errors.", {
5354
5455# betaGetShapes ----
5556test_that(" betaGetShapes throws errors." , {
57+ skip_on_cran()
5658 expect_error(betaGetShapes(1 , 12 ), class = " simstudy::valueError" )
5759 expect_error(betaGetShapes(.5 , - 5 ), class = " simstudy::valueError" )
5860})
5961
6062test_that(" betaGetShapes works." , {
63+ skip_on_cran()
6164 expect_equal(betaGetShapes(.4 , 5 ), list (shape1 = .4 * 5 , shape2 = (1 - .4 ) * 5 ))
6265})
6366
6467# genMixFormula ----
6568test_that(" genMixFormula throws errors." , {
69+ skip_on_cran()
6670 expect_error(genMixFormula(), class = " simstudy::missingArgument" )
6771 expect_error(genMixFormula(" a" , varLength = 3 ), class = " simstudy::valueError" )
6872 expect_error(genMixFormula(" ..a" , varLength = " b" ), class = " simstudy::wrongType" )
@@ -72,6 +76,7 @@ test_that("genMixFormula throws errors.", {
7276})
7377
7478test_that(" genMixFormula works." , {
79+ skip_on_cran()
7580 expect_equal(genMixFormula(" a" ), " a | 1" )
7681 expect_equal(genMixFormula(c(" a" , " ..b" ), c(.3 , .7 )), " a | 0.3 + ..b | 0.7" )
7782 expect_equal(
@@ -83,6 +88,7 @@ test_that("genMixFormula works.", {
8388# survGetParams ----
8489
8590test_that(" survGetParams throws errors." , {
91+ skip_on_cran()
8692 expect_error(survGetParams(), class = " simstudy::missingArgument" )
8793 expect_error(survGetParams(c(100 , .5 )), class = " simstudy::wrongClass" )
8894 points <- list (c(280 , 0.85 ), c(165 , .45 ))
@@ -96,6 +102,7 @@ test_that("survGetParams throws errors.", {
96102})
97103
98104test_that(" survGetParam works." , {
105+ skip_on_cran()
99106 points <- list (c(50 , 0.90 ), c(100 , 0.10 ))
100107 expect_equal(survGetParams(points ), c(- 19.658 , 0.225 ), tolerance = .001 )
101108 points <- list (c(60 , 0.90 ), c(100 , .75 ), c(200 , .25 ), c(250 , .10 ))
@@ -105,12 +112,14 @@ test_that("survGetParam works.", {
105112# plotSurv ----
106113
107114test_that(" survParamPlot throws errors." , {
115+ skip_on_cran()
108116 expect_error(survParamPlot(), class = " simstudy::missingArgument" )
109117 expect_error(survParamPlot(formula = - 10 ), class = " simstudy::missingArgument" )
110118 expect_error(survParamPlot(formula = 4 , shape = - 1 ), class = " simstudy::wrongSign" )
111119})
112120
113121test_that(" survParamPlot works." , {
122+ skip_on_cran()
114123 expect_is(survParamPlot(formula = - 4 , shape = 1 ), class = " ggplot" )
115124
116125 points <- list (c(100 , .8 ), c(200 , .5 ))
0 commit comments