Running ‘testthat.R’ [4s/6s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > test_check("validate")
  Loading required package: validate
  
  Attaching package: 'validate'
  
  The following object is masked from 'package:testthat':
  
      compare
  
  ── 1. Error: vectorizing if-statmentes (@testParse.R#126)  ─────────────────────
  no such index at level 1
  1: vectorize(expression(if (P) Q)[[1]]) at testthat/testParse.R:126
  2: vectorize(replace_if(x))
  3: replace_if(x)
  
  ── 2. Error: Rule 03 poc (@testPoC.R#19)  ──────────────────────────────────────
  long vectors not supported yet: ../../../src/src/main/subassign.c:1830
  1: expect_equivalent(values(confront(dat, v)), matrix(TRUE)) at testthat/testPoC.R:19
  2: quasi_label(enquo(object), label)
  3: eval_bare(get_expr(quo), get_env(quo))
  4: values(confront(dat, v))
  5: confront(dat, v)
  6: confront(dat, v)
  7: .local(dat, x, ...)
  8: confront_work(x, data_env, key, "validation", ...)
  9: x$exprs(expand_assignments = TRUE, lin_eq_eps = lin_eq_eps, dat = dat)
  10: .get_exprs(.self, ...)
  11: expand_assignments(exprs)
  12: lapply(calls, function(x) {
         x <- substitute_assignments(x, e)
         if (x[[1]] == ":=") 
             add_assignment(x, e)
         x
     })
  13: FUN(X[[i]], ...)
  14: substitute_assignments(x, e)
  
  ── 3. Error: Rule 06 poc (@testPoC.R#45)  ──────────────────────────────────────
  no such index at level 1
  1: expect_equivalent(values(confront(dat, v)), matrix(c(TRUE, TRUE, FALSE, FALSE, NA), 
         nrow = 5)) at testthat/testPoC.R:45
  2: quasi_label(enquo(object), label)
  3: eval_bare(get_expr(quo), get_env(quo))
  4: values(confront(dat, v))
  5: confront(dat, v)
  6: confront(dat, v)
  7: .local(dat, x, ...)
  8: confront_work(x, data_env, key, "validation", ...)
  9: x$exprs(expand_assignments = TRUE, lin_eq_eps = lin_eq_eps, dat = dat)
  10: .get_exprs(.self, ...)
  11: lapply(exprs, vectorize)
  12: FUN(X[[i]], ...)
  13: vectorize(replace_if(x))
  14: replace_if(x)
  
  ── 4. Error: Rule 07 poc (@testPoC.R#54)  ──────────────────────────────────────
  object 'ratio' not found
  1: expect_equivalent(values(confront(dat, v)), matrix(c(FALSE, TRUE, FALSE, TRUE), nrow = 4)) at testthat/testPoC.R:54
  2: quasi_label(enquo(object), label)
  3: eval_bare(get_expr(quo), get_env(quo))
  4: values(confront(dat, v))
  5: confront(dat, v)
  6: confront(dat, v)
  7: .local(dat, x, ...)
  8: confront_work(x, data_env, key, "validation", ...)
  9: execute(calls, dat, opts)
  10: lapply(calls, function(g) {
         if (g[[1]] == ":=") {
             var <- as.character(left(g))
             if (var %in% variables(env)) 
                 warning(sprintf("Locally overwriting variable '%s'", var))
             assign(var, tryCatch(eval(right(g), env), error = warning), envir = env)
         }
         else {
             val <- factory(eval, opts)(g, env)
             if (!is.na(opts("na.value"))) {
                 val[[1]] <- ifelse(is.na(val[[1]]), opts("na.value"), val[[1]])
             }
             val
         }
     })
  11: FUN(X[[i]], ...)
  12: factory(eval, opts)(g, env)
  13: outcheck(fun)(...)
  14: fun(...)
  15: fun(...)
  
  ── 5. Error: Rule 16 poc (@testPoC.R#170)  ─────────────────────────────────────
  object 'child_sums' not found
  1: expect_equivalent(values(confront(dat, v)), matrix(FALSE)) at testthat/testPoC.R:170
  2: quasi_label(enquo(object), label)
  3: eval_bare(get_expr(quo), get_env(quo))
  4: values(confront(dat, v))
  5: confront(dat, v)
  6: confront(dat, v)
  7: .local(dat, x, ...)
  8: confront_work(x, data_env, key, "validation", ...)
  9: execute(calls, dat, opts)
  10: lapply(calls, function(g) {
         if (g[[1]] == ":=") {
             var <- as.character(left(g))
             if (var %in% variables(env)) 
                 warning(sprintf("Locally overwriting variable '%s'", var))
             assign(var, tryCatch(eval(right(g), env), error = warning), envir = env)
         }
         else {
             val <- factory(eval, opts)(g, env)
             if (!is.na(opts("na.value"))) {
                 val[[1]] <- ifelse(is.na(val[[1]]), opts("na.value"), val[[1]])
             }
             val
         }
     })
  11: FUN(X[[i]], ...)
  12: factory(eval, opts)(g, env)
  13: outcheck(fun)(...)
  14: fun(...)
  15: fun(...)
  
  ── 6. Failure: Rule 17 poc (@testPoC.R#182)  ───────────────────────────────────
  values(confront(dat, v, ref = list(person = dat1))) not equivalent to matrix(c(TRUE, FALSE, FALSE, TRUE, NA), nrow = 5).
  Types not compatible: integer is not logical
  
  ── 7. Error: Rule 18 poc (@testPoC.R#192)  ─────────────────────────────────────
  recursive indexing failed at level 3
  1: expect_equivalent(values(confront(dat, v, ref = list(persons = dat1))), matrix(FALSE)) at testthat/testPoC.R:192
  2: quasi_label(enquo(object), label)
  3: eval_bare(get_expr(quo), get_env(quo))
  4: values(confront(dat, v, ref = list(persons = dat1)))
  5: confront(dat, v, ref = list(persons = dat1))
  6: confront(dat, v, ref = list(persons = dat1))
  7: .local(dat, x, ref, ...)
  8: confront_work(x, data_env, key, class = "validation", ...)
  9: x$exprs(expand_assignments = TRUE, lin_eq_eps = lin_eq_eps, dat = dat)
  10: .get_exprs(.self, ...)
  11: lapply(exprs, replace_dollar)
  12: FUN(X[[i]], ...)
  13: paste0(left(x[[I]]), "[, \"", deparse(right(x[[I]])), "\" ]")
  14: left(x[[I]])
  
  ── 8. Error: Confrontations with slack on linear equalities (@test_confrontation
  no such index at level 1
  1: expect_true(values(confront(d, u))) at testthat/test_confrontation.R:126
  2: quasi_label(enquo(object), label)
  3: eval_bare(get_expr(quo), get_env(quo))
  4: values(confront(d, u))
  5: confront(d, u)
  6: confront(d, u)
  7: .local(dat, x, ...)
  8: confront_work(x, data_env, key, "validation", ...)
  9: x$exprs(expand_assignments = TRUE, lin_eq_eps = lin_eq_eps, dat = dat)
  10: .get_exprs(.self, ...)
  11: lapply(exprs, vectorize)
  12: FUN(X[[i]], ...)
  13: vectorize(replace_if(x))
  14: replace_if(x)
  
  ── 9. Error: show methods do not crash (@test_methods.R#80)  ───────────────────
  argument 1 (type 'S4') cannot be handled by 'cat'
  1: capture.output(validator(x + y == z)[[1]]) at testthat/test_methods.R:80
  2: print(item$value)
  3: print.rule(item$value)
  4: cat(x, ..., sep = sep)
  
  ══ testthat results  ═══════════════════════════════════════════════════════════
  OK: 236 SKIPPED: 2 FAILED: 9
  1. Error: vectorizing if-statmentes (@testParse.R#126) 
  2. Error: Rule 03 poc (@testPoC.R#19) 
  3. Error: Rule 06 poc (@testPoC.R#45) 
  4. Error: Rule 07 poc (@testPoC.R#54) 
  5. Error: Rule 16 poc (@testPoC.R#170) 
  6. Failure: Rule 17 poc (@testPoC.R#182) 
  7. Error: Rule 18 poc (@testPoC.R#192) 
  8. Error: Confrontations with slack on linear equalities (@test_confrontation.R#126) 
  9. Error: show methods do not crash (@test_methods.R#80) 
  
  Error: testthat unit tests failed
  Execution halted