@@ -593,6 +593,7 @@ test_that("Basic Functionality Test", {
593593})
594594
595595test_that(" Distribution Test" , {
596+ set.seed(1000 )
596597 def <- defData(varname = " xNorm" , formula = 8 , variance = 4 , dist = " normal" )
597598 def <- defData(def , varname = " xGamma1" , formula = 15 , variance = 2 , dist = " gamma" )
598599 def <- defData(def , varname = " xUniform1" , formula = " 3;8" , dist = " uniform" )
@@ -612,17 +613,19 @@ test_that("Distribution Test", {
612613})
613614
614615test_that(" Correlation Structure Test" , {
616+ set.seed(123 )
615617 def <- defData(varname = " xNorm" , formula = 7 , variance = 4 , dist = " normal" )
616618 def <- defData(def , varname = " xGamma1" , formula = 15 , variance = 2 , dist = " gamma" )
617619
618- dt <- genCorFlex(500 , def , rho = .3 , corstr = " cs" )
620+ dt <- genCorFlex(1000 , def , rho = .3 , corstr = " cs" )
619621
620622 cor_matrix <- cor(dt [, - " id" ])
621623 expect_equal(cor_matrix , matrix (c(1 , .3 , .3 , 1 ), 2 , 2 ),
622624 tolerance = .15 , check.attributes = FALSE )
623625})
624626
625627test_that(" Correlation Structure Test for tau" , {
628+ set.seed(123 )
626629 def <- defData(varname = " xPois1" , formula = 7 , dist = " poisson" )
627630 def <- defData(def , varname = " xPois2" , formula = 15 , dist = " poisson" )
628631
@@ -633,6 +636,7 @@ test_that("Correlation Structure Test for tau", {
633636})
634637
635638test_that(" Character error for formula" , {
639+ set.seed(123 )
636640 # Create a definition with a non-numeric formula to trigger the warning
637641 def <- data.table :: data.table(
638642 varname = c(" xNorm" , " xInvalid" ),
0 commit comments