Running ‘test_advanced.R’ [2s/2s]
  Running ‘test_auxurng.R’ [1s/1s]
  Running ‘test_deprecated.R’ [1s/1s]
  Running ‘test_distributions_cont.R’ [5s/6s]
  Running ‘test_distributions_discr.R’ [1s/1s]
  Running ‘test_packed.R’ [1s/1s]
  Running ‘test_routines.R’ [0s/1s]
  Running ‘test_ud.R’ [2s/3s]
  Running ‘test_universal.R’ [7s/8s]
  Running ‘test_unuran.R’ [7s/7s]
Running the tests in ‘tests/test_distributions_discr.R’ failed.
Complete output:
  > #############################################################################
  > ##                                                                         ##
  > ##   Tests for wrapper functions for special distributions                 ##
  > ##                                                                         ##
  > #############################################################################
  > ##                                                                         ##
  > ##   Discrete distributions                                                ##
  > ##                                                                         ##
  > #############################################################################
  > ##                                                                         ##
  > ##   Remark: You must use named arguments when calling the test routines!  ##
  > ##                                                                         ##
  > #############################################################################
  > 
  > ## --- Load test routines and test parameters -------------------------------
  > 
  > source("test_routines.R")
  > 
  > ## --- Chi^2 goodness-of-fit test -------------------------------------------
  > 
  > ## Binomial distribution - (replacement for rbinom) -------------------------
  > for (i in 1:n.rep.domains) {
  +         d <- sort(rbinom(2,size=200,prob=0.29))
  +         d[2] <- d[2]+1   ## protect agains domains of length 1
  +         unur.test.discr("binom", size=200, prob=0.3, domain=d)
  + }
  binom(200,0.3) domain=(48,57): chisq test PASSed with p-value=0.880921
  binom(200,0.3) domain=(49,71): chisq test PASSed with p-value=0.159848
  > for (i in 1:n.rep.params) {
  +         s <- as.integer(runif(1,min=10,max=1000))
  +         p <- runif(1,min=0.01,max=0.99)
  +         unur.test.discr("binom", size=s, prob=p, domain=c(0,s))
  + }
  binom(413,0.0270793507760391) domain=(0,413): chisq test PASSed with p-value=0.861479
  binom(326,0.858777122884057) domain=(0,326): chisq test PASSed with p-value=0.140403
  binom(280,0.748052179506049) domain=(0,280): chisq test PASSed with p-value=0.41579
  binom(604,0.0254176106490195) domain=(0,604): chisq test PASSed with p-value=0.908133
  binom(667,0.328720684172586) domain=(0,667): chisq test PASSed with p-value=0.987339
  > 
  > 
  > size <- 1000
  > prob <- 0.2
  > binom.pmf <- function (x) { dbinom(x, size, prob) }
  > rud <- function (n,lb=0,ub=size) {
  +   dist <- udbinom(size=size,prob=prob)
  +   gen <- unuran.new(dist)
  +   ur(gen,n)
  + }
  > unur.test.discr("rud.binom", rfunc=rud, dfunc=binom.pmf, domain=c(0,size))
  rud.binom() domain=(0,1000): chisq test PASSed with p-value=0.860482
  > rm(rud)
  > rm(size,prob,binom.pmf)
  > 
  > ## Geometric distribution - (replacement for rgeom) -------------------------
  > for (i in 1:n.rep.domains) {
  +         d <- sort(rbinom(2,size=200,prob=0.29))
  +         d[2] <- d[2]+1   ## protect agains domains of length 1
  +         unur.test.discr("geom", prob=0.1, domain=d)
  + }
  geom(0.1) domain=(72,76): Error in chisq.test(hits, p = probs, rescale.p = TRUE) : 
    'x' must at least have 2 elements
  Calls: unur.test.discr -> chisq.test
  Execution halted