Running ‘testthat.R’ [2s/2s]
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: linear coeffiencts can be derived (@testLinCoef.R#6) -----------------
  invalid subscript type 'list'
  1: expect_equivalent(v$linear_coefficients()$A, matrix(-1, 1, 1)) at testthat/testLinCoef.R:6
  2: compare(object, expected, check.attributes = FALSE)
  3: v$linear_coefficients()
  4: get_linear_coefficients(.self, ...)
  
  2. Failure: normalisation can be switched off (@testLinCoef.R#33) --------------
  z$linear_coefficients(normalize = FALSE)$A not equivalent to -1 * matrix(c(-2, -1, 1), 1, 3).
  Lengths differ: 0 vs 3
  
  
  3. Failure: normalisation can be switched off (@testLinCoef.R#34) --------------
  z$linear_coefficients(normalize = FALSE)$b not equivalent to -1 * matrix(3, 1, 1).
  Lengths differ: 0 vs 1
  
  
  4. Failure: Options can be executed locally without side effects (@testOptions.R#18) 
  confront(d, v, raise = "all") did not throw an error.
  Exectution time option overrules global options.
  
  5. Failure: Options can be executed locally without side effects (@testOptions.R#22) 
  confront(d, v) did not throw an error.
  
  
  6. Failure: Options can be executed locally without side effects (@testOptions.R#24) 
  confront(d, v) did not throw an error.
  Execution time option has no side effects on object option.
  
  7. Failure: validation from data.frames (@testParse.R#66) ----------------------
  length(validator(.data = d)) not equal to 2.
  1/1 mismatches
  [1] 0 - 2 == -2
  
  
  8. Failure: validation from data.frames (@testParse.R#67) ----------------------
  length(validator(.data = d[-3])) not equal to 2.
  1/1 mismatches
  [1] 0 - 2 == -2
  
  
  9. Failure: validating_call (@testParse.R#105) ---------------------------------
  validating_call(expression(x > y)[[1]]) isn't true.
  
  
  10. Failure: validating_call (@testParse.R#106) --------------------------------
  validating_call(expression(x >= y)[[1]]) isn't true.
  
  
  11. Failure: validating_call (@testParse.R#107) --------------------------------
  validating_call(expression(x == y)[[1]]) isn't true.
  
  
  12. Failure: validating_call (@testParse.R#108) --------------------------------
  validating_call(expression(x != y)[[1]]) isn't true.
  
  
  13. Failure: validating_call (@testParse.R#109) --------------------------------
  validating_call(expression(x <= y)[[1]]) isn't true.
  
  
  14. Failure: validating_call (@testParse.R#110) --------------------------------
  validating_call(expression(x < y)[[1]]) isn't true.
  
  
  15. Failure: validating_call (@testParse.R#113) --------------------------------
  validating_call(expression(!(x > y))[[1]]) isn't true.
  
  
  16. Failure: validating_call (@testParse.R#114) --------------------------------
  validating_call(expression(all(x > y))[[1]]) isn't true.
  
  
  17. Failure: validating_call (@testParse.R#115) --------------------------------
  validating_call(expression(any(x > y))[[1]]) isn't true.
  
  
  18. Failure: validating_call (@testParse.R#118) --------------------------------
  validating_call(expression(if (x == 1) y == 1)[[1]]) isn't true.
  
  
  19. Failure: validating_call (@testParse.R#119) --------------------------------
  validating_call(expression(xor(x == 1, y == 1))[[1]]) isn't true.
  
  
  20. Failure: translation of rules to data.frame (@testParse.R#162) -------------
  nrow(as.data.frame(v)) not equal to 2.
  1/1 mismatches
  [1] 0 - 2 == -2
  
  
  21. Failure: Functional dependencies (@testSyntax.R#81) ------------------------
  values(cf) not equivalent to array(c(TRUE, FALSE, TRUE, TRUE), dim = c(4, 1)).
  current is not list-like
  
  
  22. Failure: validating/indicating expressions can be named (@testUtils.R#29) --
  names(validator(aap = x > 3)) not equal to "aap".
  Modes: list, character
  Length mismatch: comparison on first 0 components
  
  
  23. Error: compare works (@testUtils.R#52) -------------------------------------
  invalid 'type' (list) of argument
  1: expect_equivalent(unclass(compare(v, d1, d2)), a) at testthat/testUtils.R:52
  2: compare(object, expected, check.attributes = FALSE)
  3: compare(v, d1, d2)
  4: compare(v, d1, d2)
  5: .local(x, ...)
  6: vapply(L, function(y) compare2(confront(y, x), ref), FUN.VALUE = numeric(11))
  7: FUN(X[[i]], ...)
  8: compare2(confront(y, x), ref)
  9: compare2(confront(y, x), ref)
  
  24. Error: blocks works (@testUtils.R#57) --------------------------------------
  subscript out of bounds
  1: expect_equivalent(v$blocks()[[1]], c(1, 3)) at testthat/testUtils.R:57
  2: compare(object, expected, check.attributes = FALSE)
  3: v$blocks()
  4: .blocks_expressionset(.self)
  5: lapply(1:nrow(A), function(i) which(A[i, ]))
  6: FUN(X[[i]], ...)
  7: which(A[i, ])
  
  25. Failure: keys are copied to rownames (@testValidate.R#7) -------------------
  rownames(values(confront(w, validator(height > weight), key = "code"))) not equal to w$code.
  target is NULL, current is character
  
  
  26. Failure: validation object contents (@test_confrontation.R#8) --------------
  length(cf) not equal to 3.
  1/1 mismatches
  [1] 0 - 3 == -3
  
  
  27. Failure: validation object contents (@test_confrontation.R#9) --------------
  names(summary(cf)) not equal to c(...).
  Lengths differ: 2 vs 8
  
  
  28. Failure: validation object contents (@test_confrontation.R#12) -------------
  values(cf) not equivalent to array(vl, dim = c(15, 2)).
  current is not list-like
  
  
  29. Error: validation object contents (@test_confrontation.R#13) ---------------
  subscript out of bounds
  1: expect_equal(errors(cf)[[1]], "object 'ape' not found") at testthat/test_confrontation.R:13
  2: compare(object, expected, ...)
  
  30. Failure: confrontation method with custom na.values (@test_confrontation.R#56) 
  values(confront(d, v)) not equivalent to matrix(c(TRUE, FALSE, NA)).
  current is not list-like
  
  
  31. Failure: confrontation method with custom na.values (@test_confrontation.R#57) 
  values(confront(d, v, na.value = FALSE)) not equivalent to matrix(c(TRUE, FALSE, FALSE)).
  current is not list-like
  
  
  32. Failure: confrontation method with custom na.values (@test_confrontation.R#58) 
  values(confront(d, v, na.value = TRUE)) not equivalent to matrix(c(TRUE, FALSE, TRUE)).
  current is not list-like
  
  
  33. Error: Confrontation methods with reference data (@test_confrontation.R#70) 
  undefined columns selected
  1: expect_equal(summary(cf1)[1:7], summary(cf2)[1:7]) at testthat/test_confrontation.R:70
  2: compare(object, expected, ...)
  3: summary(cf1)[1:7]
  4: `[.data.frame`(summary(cf1), 1:7)
  5: stop("undefined columns selected")
  
  34. Failure: confrontations with transient variables (@test_confrontation.R#105) 
  values(confront(women, v)) not equivalent to array(TRUE, dim = c(15, 1)).
  current is not list-like
  
  
  35. Failure: Confrontations with slack on linear equalities (@test_confrontation.R#117) 
  values(confront(d, v)) isn't false.
  
  
  36. Failure: Confrontations with slack on linear equalities (@test_confrontation.R#118) 
  values(confront(d, v, lin.eq.eps = 2)) isn't true.
  
  
  37. Failure: Confrontations with slack on linear equalities (@test_confrontation.R#121) 
  values(confront(d, w)) isn't false.
  
  
  38. Failure: Confrontations with slack on linear equalities (@test_confrontation.R#122) 
  values(confront(d, w, lin.eq.eps = 2)) isn't false.
  
  
  39. Failure: Confrontations with slack on linear equalities (@test_confrontation.R#126) 
  values(confront(d, u)) isn't true.
  
  
  40. Failure: Confrontations with slack on linear equalities (@test_confrontation.R#127) 
  values(confront(d, u, lin.eq.eps = 2)) isn't false.
  
  
  41. Failure: coerce confrontations to data.frame (@test_confrontation.R#147) ---
  nrow(as.data.frame(confront(women, v))) not equal to 16.
  target is NULL, current is numeric
  
  
  42. Failure: coerce confrontations to data.frame (@test_confrontation.R#148) ---
  ncol(as.data.frame(confront(women, v))) not equal to 3.
  target is NULL, current is numeric
  
  
  43. Failure: coerce confrontations to data.frame (@test_confrontation.R#149) ---
  ncol(as.data.frame(confront(women, v, key = "id"))) not equal to 4.
  target is NULL, current is numeric
  
  
  44. Failure: coerce confrontations to data.frame (@test_confrontation.R#153) ---
  as.data.frame(d) showed 0 warnings
  
  
  45. Error: lbj_rules (@test_lumberjack.R#27) -----------------------------------
  invalid 'type' (list) of argument
  1: lbj$add(meta, d1, d2) at testthat/test_lumberjack.R:27
  2: cbind(compare(.self$rules, input, output))
  3: compare(.self$rules, input, output)
  4: compare(.self$rules, input, output)
  5: .local(x, ...)
  6: vapply(L, function(y) compare2(confront(y, x), ref), FUN.VALUE = numeric(11))
  7: FUN(X[[i]], ...)
  8: compare2(confront(y, x), ref)
  9: compare2(confront(y, x), ref)
  
  46. Error: Expressionset extraction (@test_methods.R#8) ------------------------
  subscript out of bounds
  1: expect_equivalent(class(v[[1]]), "rule") at testthat/test_methods.R:8
  2: compare(object, expected, check.attributes = FALSE)
  3: v[[1]]
  4: v[[1]]
  5: .local(x, i, j, ...)
  
  47. Failure: name setter (@test_methods.R#21) ----------------------------------
  names(v) <- c("A", "B") showed 0 warnings
  
  
  48. Failure: Variables can be retrieved (@test_methods.R#26) -------------------
  variables(validator(x > 0)) not equal to "x".
  target is NULL, current is character
  
  
  49. Failure: Variables can be retrieved (@test_methods.R#27) -------------------
  sort(variables(validator(x > 0, y > 0))) not equal to c("x", "y").
  target is NULL, current is character
  
  
  50. Failure: Variables can be retrieved (@test_methods.R#28) -------------------
  variables(validator(x > 0, x < 1)) not equal to "x".
  target is NULL, current is character
  
  
  51. Failure: Variables can be retrieved (@test_methods.R#29) -------------------
  sort(variables(validator(x + y > 0, y < 1))) not equal to c("x", "y").
  target is NULL, current is character
  
  
  52. Failure: Variables can be retrieved (@test_methods.R#30) -------------------
  variables(validator(`:=`(x, 2 * y), x > 1)) not equal to "y".
  target is NULL, current is character
  
  
  53. Failure: Variables can be retrieved (@test_methods.R#37) -------------------
  variables(v, as = "matrix") not equivalent to array(c(T, T, F, T), dim = c(2, 2)).
  Lengths (0, 4) differ (comparison on first 0 components)
  
  
  54. Failure: Variables can be retrieved (@test_methods.R#41) -------------------
  variables(v, as = "matrix", dummy = TRUE) not equivalent to array(c(T, F, T, T, T, T, F, F, T), dim = c(3, 3)).
  Lengths (2, 9) differ (comparison on first 2 components)
  1 element mismatch
  
  
  55. Error: Variables can be retrieved (@test_methods.R#46) ---------------------
  subscript out of bounds
  1: expect_equal(sort(variables(v[[1]])), c("x", "y")) at testthat/test_methods.R:46
  2: compare(object, expected, ...)
  3: sort(variables(v[[1]]))
  4: variables(v[[1]])
  5: v[[1]]
  6: v[[1]]
  7: .local(x, i, j, ...)
  
  56. Failure: Confrontation extraction (@test_methods.R#60) ---------------------
  length(cf) not equal to 2.
  1/1 mismatches
  [1] 0 - 2 == -2
  
  
  57. Error: barplot doesn't crash (@test_methods.R#71) --------------------------
  invalid value specified for graphical parameter "mfrow"
  1: nullplot() at testthat/test_methods.R:71
  2: barplot(check_that(women, height > 0, weight/height > 2), ...) at testthat/test_methods.R:69
  3: barplot(check_that(women, height > 0, weight/height > 2), ...)
  4: .local(height, ...)
  5: par(mfrow = c(length(val), 1))
  
  58. Error: show methods do not crash (@test_methods.R#80) ----------------------
  subscript out of bounds
  1: capture.output(validator(x + y == z)[[1]]) at testthat/test_methods.R:80
  2: evalVis(expr)
  3: withVisible(eval(expr, pf))
  4: eval(expr, pf)
  5: eval(expr, pf)
  6: validator(x + y == z)[[1]]
  7: validator(x + y == z)[[1]]
  8: .local(x, i, j, ...)
  
  59. Error: setting properties (@test_validator.R#7) ----------------------------
  invalid to use names()<- on an S4 object of class 'validator'
  1: .handleSimpleError(function (e) 
     {
         e$call <- sys.calls()[(frame + 11):(sys.nframe() - 2)]
         register_expectation(e, frame + 11, sys.nframe() - 2)
         signalCondition(e)
     }, "invalid to use names()<- on an S4 object of class 'validator'", quote(names(v)[1] <- "foo")) at testthat/test_validator.R:7
  2: eval(code, test_env)
  
  60. Error: composing validators (@test_validator.R#25) -------------------------
  missing value where TRUE/FALSE needed
  1: validator(x > 0) + validator(x < 1) at testthat/test_validator.R:25
  2: validator(x > 0) + validator(x < 1)
  3: `names<-`(`*tmp*`, value = character(0))
  4: `names<-`(`*tmp*`, value = character(0))
  5: make.names(recycle(value, x), unique = TRUE)
  6: recycle(value, x)
  
  61. Error: regression tests (@test_validator.R#34) -----------------------------
  missing value where TRUE/FALSE needed
  1: `created<-`(`*tmp*`, value = structure(numeric(0), class = c("POSIXct", "POSIXt"), tzone = "")) at testthat/test_validator.R:34
  2: `created<-`(`*tmp*`, value = structure(numeric(0), class = c("POSIXct", "POSIXt"), tzone = ""))
  3: recycle(value, x)
  
  testthat results ================================================================
  OK: 203 SKIPPED: 0 FAILED: 61
  1. Error: linear coeffiencts can be derived (@testLinCoef.R#6) 
  2. Failure: normalisation can be switched off (@testLinCoef.R#33) 
  3. Failure: normalisation can be switched off (@testLinCoef.R#34) 
  4. Failure: Options can be executed locally without side effects (@testOptions.R#18) 
  5. Failure: Options can be executed locally without side effects (@testOptions.R#22) 
  6. Failure: Options can be executed locally without side effects (@testOptions.R#24) 
  7. Failure: validation from data.frames (@testParse.R#66) 
  8. Failure: validation from data.frames (@testParse.R#67) 
  9. Failure: validating_call (@testParse.R#105) 
  1. ...
  
  Error: testthat unit tests failed
  Execution halted