Running 'test_lecuyer.R' [1s]
  Running 'test_load.R' [168s]
  Running 'test_mrg32k3a.R' [152s]
  Running 'test_routines.R' [0s]
  Running 'test_runif.R' [167s]
  Running 'test_version.R' [0s]
Running the tests in 'tests/test_load.R' failed.
Complete output:
  > ## --------------------------------------------------------------------------
  > ## Test loading of saved rstream object
  > ##
  > 
  > library(rstream)
  > load("test_load.RData")
  > rstream.packed(stream1) <- FALSE
  > rstream.sample(stream1,10)
   [1] 0.001009498 0.595003784 0.357834538 0.222340827 0.466827597 0.378907797
   [7] 0.006938634 0.994035933 0.759799247 0.811096096
  > 
  > proc.time()
     user  system elapsed 
     0.25    0.06    0.29 
Running the tests in 'tests/test_mrg32k3a.R' failed.
Complete output:
  > #############################################################################
  > ##                                                                         ##
  > ##   Tests for class: rstream.mrg32k3a                                     ##
  > ##                                                                         ##
  > #############################################################################
  > 
  > ## Test Parameters ----------------------------------------------------------
  > 
  > ## samplesize <- 1e4
  > ## streamname <- "testname"
  > 
  > 
  > ## Load test routines -------------------------------------------------------
  > 
  > source ("test_routines.R")
  > 
  > 
  > ## Check: API ---------------------------------------------------------------
  > 
  > ## Run general tests
  > rstream.check.API("rstream.mrg32k3a")
  
  Object is random stream
  
  	type = rstream.mrg32k3a
  	       [mrg32k3a: RngStreams - library for multiple independent streams of Random Numbers]
  	name = "testname"
  	antithetic = FALSE
  	increased Precision = FALSE
  
  	Internal state:
   	  initial state:
   		 1711223242 1711223242 1711223242 1711223242 1711223242 1711223242 
   	  starting point of current substream:
   		 1711223242 1711223242 1711223242 1711223242 1711223242 1711223242 
   	  current state:
   		 1711223242 1711223242 1711223242 1711223242 1711223242 1711223242 
  
  
  Object is random stream
  
  	Rstream is PACKED
  
  	type = rstream.mrg32k3a
  	       [mrg32k3a: RngStreams - library for multiple independent streams of Random Numbers]
  	name = "testname"
  	antithetic = TRUE
  	increased Precision = FALSE
  
  > 
  > ## Test interface rstream <-> R RNG
  > rstream.check.setRNG("rstream.mrg32k3a")
  > 
  > 
  > ## Check: Goodness-of-fit ---------------------------------------------------
  > 
  > ## Chi^2 goodness-of-fit test
  > rstream.check.chi2("rstream.mrg32k3a")
  
  Object is random stream
  
  	type = rstream.mrg32k3a
  	       [mrg32k3a: RngStreams - library for multiple independent streams of Random Numbers]
  	name = "mrg32k3a5"
  	antithetic = FALSE
  	increased Precision = FALSE
  
  	Internal state:
   	  initial state:
   		 253500144 838433089 1889804381 1398929287 4135712164 354040123 
   	  starting point of current substream:
   		 253500144 838433089 1889804381 1398929287 4135712164 354040123 
   	  current state:
   		 253500144 838433089 1889804381 1398929287 4135712164 354040123 
  
  Chi2 test PASSed with p-value=0.820302
  > rstream.check.chi2("rstream.mrg32k3a", antithetic=TRUE)
  
  Object is random stream
  
  	type = rstream.mrg32k3a
  	       [mrg32k3a: RngStreams - library for multiple independent streams of Random Numbers]
  	name = "mrg32k3a6"
  	antithetic = TRUE
  	increased Precision = FALSE
  
  	Internal state:
   	  initial state:
   		 1529606282 2710039575 1436314794 3223118402 3470030342 2727324251 
   	  starting point of current substream:
   		 1529606282 2710039575 1436314794 3223118402 3470030342 2727324251 
   	  current state:
   		 1529606282 2710039575 1436314794 3223118402 3470030342 2727324251 
  
  Chi2 test PASSed with p-value=0.316261
  > rstream.check.chi2("rstream.mrg32k3a", incprecision=TRUE)
  
  Object is random stream
  
  	type = rstream.mrg32k3a
  	       [mrg32k3a: RngStreams - library for multiple independent streams of Random Numbers]
  	name = "mrg32k3a7"
  	antithetic = FALSE
  	increased Precision = TRUE
  
  	Internal state:
   	  initial state:
   		 676405019 1080839842 4224103228 3616332239 4050209425 1662070389 
   	  starting point of current substream:
   		 676405019 1080839842 4224103228 3616332239 4050209425 1662070389 
   	  current state:
   		 676405019 1080839842 4224103228 3616332239 4050209425 1662070389 
  
  Chi2 test PASSed with p-value=0.433543
  > 
  > 
  > ## Special tests -----------------------------------------------------------
  > 
  > ## it must not be possible to reset the seed without flag 'force.seed'
  > if( ! iserror( new("rstream.mrg32k3a", seed=rep(12345,6)) ) )
  + 	stop("force.seed = TRUE required")
  Error in .local(.Object, ...) : 
    rstream.mrg32k3a: Package already seeded! Seed ignored!
  rstream.mrg32k3a: Set force.seed = TRUE if you really want to reseed.
  > 
  > ## one must give at least 6 numbers for the seed
  > if( ! iserror( new("rstream.mrg32k3a", seed=rep(12345,5), force.seed=TRUE) ) )
  + 	stop("seed must have length 6")
  Error in .rstream.mrg32k3a.CheckSeed(seed) : 
    rstream.mrg32k3a: seed too short; 6 numbers required
  > 
  > ## run with all optional arguments
  > s <- new("rstream.mrg32k3a", seed=rep(12345,6), force.seed=TRUE, antithetic=TRUE, incprecision=TRUE)
  > 
  > ## check generator
  > check_gen <-
  +         function(s, mean, var) {
  +                 x <- rstream.sample(s,100)
  +                 m <- mean(x)
  +                 v <- 99/100 * var(x)
  +                 if( abs(mean-m) > 1.e-9) stop ("wrong mean")
  +                 if( abs(var-v) > 1.e-9) stop ("wrong variance")
  + }
  > 	
  > s1 <- new("rstream.mrg32k3a", seed=rep(12345,6), force.seed=TRUE)
  > s2 <- new("rstream.mrg32k3a")
  > s3 <- new("rstream.mrg32k3a")
  > 
  > check_gen(s=s1, mean=0.51783564702603, var=0.08251698866776)
  > check_gen(s=s2, mean=0.52394642023622, var=0.09989286188901)
  > check_gen(s=s3, mean=0.54064030708121, var=0.09043368375419)
  > 
  > check_gen(s=s2, mean=0.45591975817022, var=0.07421246146254)
  > rstream.reset(s2)
  > check_gen(s=s2, mean=0.52394642023622, var=0.09989286188901)
  > 
  > rstream.antithetic(s2) <- TRUE
  > check_gen(s=s2, mean=0.54408024182978, var=0.07421246146254)
  > 
  > rstream.antithetic(s2) <- FALSE
  > rstream.incprecision(s2) <- TRUE
  > check_gen(s=s2, mean=0.57325868991301, var=0.07898987147185)
  > 
  > rstream.antithetic(s2) <- TRUE
  > check_gen(s=s2, mean=0.56487612596530, var=0.08846386734202)
  > 
  > 
  > ## End ----------------------------------------------------------------------
  > 
  > proc.time()
     user  system elapsed 
     0.75    0.09    0.82 
Running the tests in 'tests/test_runif.R' failed.
Complete output:
  > #############################################################################
  > ##                                                                         ##
  > ##   Tests for class: rstream.runif                                        ##
  > ##                                                                         ##
  > #############################################################################
  > 
  > ## Test Parameters ----------------------------------------------------------
  > 
  > ## samplesize <- 1e4
  > ## streamname <- "testname"
  > 
  > 
  > ## Load test routines -------------------------------------------------------
  > 
  > source ("test_routines.R")
  > 
  > 
  > ## Check: API ---------------------------------------------------------------
  > 
  > ## Run general tests
  > rstream.check.API("rstream.runif", kind="current", t_incp=FALSE)
  
  Object is random stream
  
  	type = rstream.runif
  	       [runif: R uniform random number generator]
  	name = "testname"
  	antithetic = FALSE
  	increased Precision = FALSE
  	RNGkind = Mersenne-Twister
  
  
  Object is random stream
  
  	Rstream is PACKED
  
  	type = rstream.runif
  	       [runif: R uniform random number generator]
  	name = "testname"
  	antithetic = TRUE
  	increased Precision = FALSE
  	RNGkind = Mersenne-Twister
  
  > rstream.check.API("rstream.runif", kind="default", t_incp=FALSE)
  
  Object is random stream
  
  	type = rstream.runif
  	       [runif: R uniform random number generator]
  	name = "testname"
  	antithetic = FALSE
  	increased Precision = FALSE
  	RNGkind = Mersenne-Twister
  
  
  Object is random stream
  
  	Rstream is PACKED
  
  	type = rstream.runif
  	       [runif: R uniform random number generator]
  	name = "testname"
  	antithetic = TRUE
  	increased Precision = FALSE
  	RNGkind = Mersenne-Twister
  
  > rstream.check.API("rstream.runif", kind="Wichmann-Hill", t_incp=FALSE)
  
  Object is random stream
  
  	type = rstream.runif
  	       [runif: R uniform random number generator]
  	name = "testname"
  	antithetic = FALSE
  	increased Precision = FALSE
  	RNGkind = Wichmann-Hill
  
  
  Object is random stream
  
  	Rstream is PACKED
  
  	type = rstream.runif
  	       [runif: R uniform random number generator]
  	name = "testname"
  	antithetic = TRUE
  	increased Precision = FALSE
  	RNGkind = Wichmann-Hill
  
  > rstream.check.API("rstream.runif", kind="Marsaglia-Multicarry", t_incp=FALSE)
  
  Object is random stream
  
  	type = rstream.runif
  	       [runif: R uniform random number generator]
  	name = "testname"
  	antithetic = FALSE
  	increased Precision = FALSE
  	RNGkind = Marsaglia-Multicarry
  
  
  Object is random stream
  
  	Rstream is PACKED
  
  	type = rstream.runif
  	       [runif: R uniform random number generator]
  	name = "testname"
  	antithetic = TRUE
  	increased Precision = FALSE
  	RNGkind = Marsaglia-Multicarry
  
  Warning message:
  In RNGkind(kind = kind) :
    RNGkind: Marsaglia-Multicarry has poor statistical properties
  > rstream.check.API("rstream.runif", kind="Super-Duper", t_incp=FALSE)
  
  Object is random stream
  
  	type = rstream.runif
  	       [runif: R uniform random number generator]
  	name = "testname"
  	antithetic = FALSE
  	increased Precision = FALSE
  	RNGkind = Super-Duper
  
  
  Object is random stream
  
  	Rstream is PACKED
  
  	type = rstream.runif
  	       [runif: R uniform random number generator]
  	name = "testname"
  	antithetic = TRUE
  	increased Precision = FALSE
  	RNGkind = Super-Duper
  
  > rstream.check.API("rstream.runif", kind="Mersenne-Twister", t_incp=FALSE)
  
  Object is random stream
  
  	type = rstream.runif
  	       [runif: R uniform random number generator]
  	name = "testname"
  	antithetic = FALSE
  	increased Precision = FALSE
  	RNGkind = Mersenne-Twister
  
  
  Object is random stream
  
  	Rstream is PACKED
  
  	type = rstream.runif
  	       [runif: R uniform random number generator]
  	name = "testname"
  	antithetic = TRUE
  	increased Precision = FALSE
  	RNGkind = Mersenne-Twister
  
  > rstream.check.API("rstream.runif", kind="Knuth-TAOCP", t_incp=FALSE)
  
  Object is random stream
  
  	type = rstream.runif
  	       [runif: R uniform random number generator]
  	name = "testname"
  	antithetic = FALSE
  	increased Precision = FALSE
  	RNGkind = Knuth-TAOCP
  
  
  Object is random stream
  
  	Rstream is PACKED
  
  	type = rstream.runif
  	       [runif: R uniform random number generator]
  	name = "testname"
  	antithetic = TRUE
  	increased Precision = FALSE
  	RNGkind = Knuth-TAOCP
  
  > rstream.check.API("rstream.runif", kind="Knuth-TAOCP-2002", t_incp=FALSE)
  
  Object is random stream
  
  	type = rstream.runif
  	       [runif: R uniform random number generator]
  	name = "testname"
  	antithetic = FALSE
  	increased Precision = FALSE
  	RNGkind = Knuth-TAOCP-2002
  
  
  Object is random stream
  
  	Rstream is PACKED
  
  	type = rstream.runif
  	       [runif: R uniform random number generator]
  	name = "testname"
  	antithetic = TRUE
  	increased Precision = FALSE
  	RNGkind = Knuth-TAOCP-2002
  
  > 
  > ## user-defined RNG must not work
  > if( ! iserror( rstream.check.API("rstream.runif", kind="user", t_incp=FALSE) ) )
  + 	stop("\"user-defined\" must not work")
  Error in .local(.Object, ...) : 
    kind="user-supplied" not allowed for Rstream object
  > 
  > ## Test interface rstream <-> R RNG
  > rstream.check.setRNG("rstream.runif", kind="current")
  > rstream.check.setRNG("rstream.runif", kind="default")
  > rstream.check.setRNG("rstream.runif", kind="Wichmann-Hill")
  > rstream.check.setRNG("rstream.runif", kind="Marsaglia-Multicarry")
  Warning messages:
  1: In RNGkind(kind = kind) :
    RNGkind: Marsaglia-Multicarry has poor statistical properties
  2: In RNGkind(kind = stream@kind) :
    RNGkind: Marsaglia-Multicarry has poor statistical properties
  3: In RNGkind(kind = current.kind) :
    RNGkind: Marsaglia-Multicarry has poor statistical properties
  4: In RNGkind(kind = stream@kind) :
    RNGkind: Marsaglia-Multicarry has poor statistical properties
  5: In RNGkind(kind = current.kind) :
    RNGkind: Marsaglia-Multicarry has poor statistical properties
  > 
  > 
  > ## Special tests -----------------------------------------------------------
  > 
  > ## run with all optional arguments
  > new("rstream.runif",seed=12345, antithetic=TRUE)
  
  Object is random stream
  
  	type = rstream.runif
  	       [runif: R uniform random number generator]
  	name = "runif26"
  	antithetic = TRUE
  	increased Precision = FALSE
  	RNGkind = Marsaglia-Multicarry
  
  Warning message:
  In RNGkind(kind = current.kind) :
    RNGkind: Marsaglia-Multicarry has poor statistical properties
  > 
  > ## when using kind="current" (which is the default)
  > ## runif() and rstream.sample should return the same values (until rstream.reset)
  > s <- new("rstream.runif")
  Warning message:
  In RNGkind(kind = current.kind) :
    RNGkind: Marsaglia-Multicarry has poor statistical properties
  > x <- rstream.sample(s,samplesize)
  > y <- runif(samplesize)
  > if (!identical(all.equal(x, y), TRUE))
  + 	stop("\"current\" failed:1")
  > 
  > ## rstream.sample() must not change .Random.seed
  > RNGkind("Knuth-TAOCP")
  > save.seed <- .Random.seed
  > x <- rstream.sample(s,samplesize)
  > if (!identical(all.equal(save.seed, .Random.seed), TRUE))
  + 	stop("seed not restored after calling rstream.sample()")
  > 
  > 
  > ## End ----------------------------------------------------------------------
  > 
  > proc.time()
     user  system elapsed 
     0.57    0.07    0.59