Running ‘testthat.R’ [6s/24s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > opar <- options(keep.source=TRUE, keep.source.pkgs=TRUE)
  > library(testthat)
  > test_check("parsetools")
  Loading required package: parsetools
  ── 1. Failure: token (@accessors.R#48)  ────────────────────────────────────────
  token(c(45, 3, 58), pd) not equal to c("SYMBOL_FUNCTION_CALL", "SYMBOL", "expr").
  2/3 mismatches
  x[1]: NA
  y[1]: "SYMBOL_FUNCTION_CALL"
  
  x[3]: "SYMBOL"
  y[3]: "expr"
  
  ── 2. Failure: text (@accessors.R#64)  ─────────────────────────────────────────
  text(c(45, 3, 58), pd) not equal to c("plot", "x", "").
  2/3 mismatches
  x[1]: NA
  y[1]: "plot"
  
  x[3]: "y"
  y[3]: ""
  
  ── 3. Failure: prev_terminal (@accessors.R#252)  ───────────────────────────────
  prev_terminal(pd$id, pd = pd) not equal to c(NA, NA, NA, 1, rep(2, 2), 4, 6, 6, 9, 11, 11, 14).
  4/13 mismatches (average diff: 1.25)
  [10] 10 -  9 == 1
  [11] 12 - 11 == 1
  [12] 12 - 11 == 1
  [13] 16 - 14 == 2
  
  ── 4. Failure: children (@children.R#103)  ─────────────────────────────────────
  pd_get_children_ids(id, pd, 1, include.self = FALSE) not equal to c(3, 2, 5, 6, 9, 10, 12, 13, 16, 17, 19, 20).
  8/12 mismatches (average diff: 1.5)
  [5]  10 -  9 == 1
  [6]  11 - 10 == 1
  [7]  13 - 12 == 1
  [8]  14 - 13 == 1
  [9]  18 - 16 == 2
  [10] 19 - 17 == 2
  [11] 21 - 19 == 2
  [12] 22 - 20 == 2
  for default values
  
  ── 5. Failure: children (@children.R#108)  ─────────────────────────────────────
  pd_get_children_ids(id, pd, 1, include.self = TRUE) not equal to c(23, 3, 2, 5, 6, 9, 10, 12, 13, 16, 17, 19, 20).
  9/13 mismatches (average diff: 1.67)
  [1]  26 - 23 == 3
  [6]  10 -  9 == 1
  [7]  11 - 10 == 1
  [8]  13 - 12 == 1
  [9]  14 - 13 == 1
  [10] 18 - 16 == 2
  [11] 19 - 17 == 2
  [12] 21 - 19 == 2
  [13] 22 - 20 == 2
  include.self=TRUE
  
  ── 6. Failure: children (@children.R#113)  ─────────────────────────────────────
  pd_get_children_ids(id, pd, 2, include.self = FALSE, aggregate = FALSE) not equal to c(1, 4, 11, 18).
  2/4 mismatches (average diff: 1.5)
  [3] 12 - 11 == 1
  [4] 20 - 18 == 2
  ngenerations=2, include.self=FALSE, aggregate=FALSE
  
  ── 7. Failure: children (@children.R#120)  ─────────────────────────────────────
  pd_get_children_ids(...) not equal to c(c(3, 2, 5, 6, 9, 10, 12, 13, 16, 17, 19, 20), c(1, 4, 11, 18)).
  10/16 mismatches (average diff: 1.5)
  [5]  10 -  9 == 1
  [6]  11 - 10 == 1
  [7]  13 - 12 == 1
  [8]  14 - 13 == 1
  [9]  18 - 16 == 2
  [10] 19 - 17 == 2
  [11] 21 - 19 == 2
  [12] 22 - 20 == 2
  [15] 12 - 11 == 1
  ...
  ngenerations=2, include.self=FALSE, aggregate=TRUE
  
  ── 8. Failure: children (@children.R#129)  ─────────────────────────────────────
  pd_get_children_ids(...) not equal to c(...).
  11/17 mismatches (average diff: 1.64)
  [1]  26 - 23 == 3
  [6]  10 -  9 == 1
  [7]  11 - 10 == 1
  [8]  13 - 12 == 1
  [9]  14 - 13 == 1
  [10] 18 - 16 == 2
  [11] 19 - 17 == 2
  [12] 21 - 19 == 2
  [13] 22 - 20 == 2
  ...
  ngenerations=2, include.self=TRUE, aggregate=TRUE
  
  ── 9. Error: get_children_pd (@children.R#166)  ────────────────────────────────
  id(23) is not present in given parse-data.
  Backtrace:
   1. testthat::expect_identical(...)
   4. parsetools:::get_children_pd(...)
   5. parsetools:::._check_id(id, pd) /data/gannet/ripley/R/packages/tests-clang/parsetools/R/children.R:151:8
  
  ── 10. Failure: get_family_pd (@family.R#82)  ──────────────────────────────────
  fam[1, "text"] not equal to "# normal comment".
  1/1 mismatches
  x[1]: "function"
  y[1]: "# normal comment"
  
  ── 11. Failure: get_family_pd (@family.R#84)  ──────────────────────────────────
  fam[1, "text"] not equal to "#' Documenation before".
  1/1 mismatches
  x[1]: "function"
  y[1]: "#' Documenation before"
  
  ── 12. Failure: get_family_pd (@family.R#86)  ──────────────────────────────────
  fam[1, "text"] not equal to "# normal comment".
  1/1 mismatches
  x[1]: "function"
  y[1]: "# normal comment"
  
  ── 13. Failure: get_family_pd (@family.R#88)  ──────────────────────────────────
  fam[1, "text"] not equal to "hw".
  1/1 mismatches
  x[1]: "function"
  y[1]: "hw"
  
  ── 14. Error: is_grouping (@grouping.R#54)  ────────────────────────────────────
  id(25) is not present in given parse-data.
  Backtrace:
   1. testthat::expect_true(pd_is_grouping(25L, pd))
   4. parsetools::pd_is_grouping(25L, pd)
   5. parsetools:::._check_id(id, pd) /data/gannet/ripley/R/packages/tests-clang/parsetools/R/grouping.R:33:5
  
  ── 15. Failure: all_grouping_ids (@grouping.R#84)  ─────────────────────────────
  all_grouping_ids(pd) not equal to 25.
  1/1 mismatches
  [1] 26 - 25 == 1
  
  ── 16. Failure: fix_grouping_comment_association (@grouping.R#139)  ────────────
  parent(all_comment_ids(fixed), fixed) not equal to c(-38, -38, -38, 34, -56, -74).
  6/6 mismatches (average diff: 1)
  [1] -39 - -38 == -1
  [2] -39 - -38 == -1
  [3] -39 - -38 == -1
  [4]  35 -  34 ==  1
  [5] -57 - -56 == -1
  [6] -75 - -74 == -1
  
  ── 17. Failure: ancestors (@parent.R#88)  ──────────────────────────────────────
  pd_get_ancestor_ids(...) not identical to c(1L, 3L, 23L, 0L).
  1/4 mismatches
  [3] 26 - 23 == 3
  defaults, but fully specified.
  
  ── 18. Failure: ancestors (@parent.R#89)  ──────────────────────────────────────
  pd_get_ancestor_ids(...) not identical to c(3L, 23L, 0L).
  1/3 mismatches
  [2] 26 - 23 == 3
  include.self=FALSE
  
  ── 19. Failure: ancestors (@parent.R#90)  ──────────────────────────────────────
  pd_get_ancestor_ids(...) not identical to c(3L, 23L).
  1/2 mismatches
  [2] 26 - 23 == 3
  ngenerations=2, include.self=FALSE
  
  ── 20. Failure: ancestors (@parent.R#91)  ──────────────────────────────────────
  pd_get_ancestor_ids(...) not identical to c(1L, 3L, 23L).
  1/3 mismatches
  [3] 26 - 23 == 3
  ngenerations=2, include.self=TRUE
  
  ── 21. Failure: ancestors (@parent.R#92)  ──────────────────────────────────────
  pd_get_ancestor_ids(...) not identical to 23L.
  1/1 mismatches
  [1] 26 - 23 == 3
  ngenerations= 2, aggregate=FALSE
  
  ── 22. Failure: ancestors (@parent.R#97)  ──────────────────────────────────────
  pd_get_ancestor_ids(...) not identical to 23L.
  1/1 mismatches
  [1] 26 - 23 == 3
  ngenerations= 2, aggregate=FALSE
  
  ── 23. Error: ancestors (@parent.R#98)  ────────────────────────────────────────
  id(23) is not present in given parse-data.
  Backtrace:
   1. testthat::expect_identical(...)
   4. parsetools::pd_get_ancestor_ids(...)
   5. parsetools:::._check_id(id, pd) /data/gannet/ripley/R/packages/tests-clang/parsetools/R/parent.R:63:8
  
  ── 24. Failure: is_assignment (@pd_assign.R#51)  ───────────────────────────────
  pd_is_assignment(roots(pd5), pd = pd5) isn't true.
  
  ── 25. Failure: assign_value (@pd_assign.R#78)  ────────────────────────────────
  pd_get_assign_value_id(all_assignment_ids(pd), pd = pd) not equal to 5L.
  1/1 mismatches
  [1] 6 - 5 == 1
  
  ── 26. Failure: call_symbol (@pd_call.R#146)  ──────────────────────────────────
  pd_get_call_symbol_id(id, pd) not equal to 45L.
  1/1 mismatches
  [1] 49 - 45 == 4
  
  ── 27. Failure: call_args (@pd_call.R#197)  ────────────────────────────────────
  `test.object` not identical to c(5L, mean = 12L, sd = 19L).
  2/3 mismatches (average diff: 1.5)
  [2] 13 - 12 == 1
  [3] 21 - 19 == 2
  
  ── 28. Failure: pd_identify.srcref (@pd_identify.R#81)  ────────────────────────
  `id` not equal to 40.
  1/1 mismatches
  [1] 41 - 40 == 1
  
  ── 29. Failure: if structures (@pd_if.R#133)  ──────────────────────────────────
  pd_get_if_branch_id(id, pd) not equal to 18L.
  1/1 mismatches
  [1] 19 - 18 == 1
  
  ── 30. Failure: if structures (@pd_if.R#134)  ──────────────────────────────────
  pd_get_if_alternate_id(id, pd) not equal to 30L.
  1/1 mismatches
  [1] 31 - 30 == 1
  
  ── 31. Error: is_root (@root.R#73)  ────────────────────────────────────────────
  id(23) is not present in given parse-data.
  Backtrace:
   1. testthat::expect_true(pd_is_root(23, pd))
   4. parsetools::pd_is_root(23, pd)
   5. parsetools:::._check_id(id, pd) /data/gannet/ripley/R/packages/tests-clang/parsetools/R/root.R:60:8
  
  ── 32. Failure: roots (@root.R#190)  ───────────────────────────────────────────
  `id` not equal to c(43, 61, 74).
  3/3 mismatches (average diff: 1)
  [1] 44 - 43 == 1
  [2] 62 - 61 == 1
  [3] 75 - 74 == 1
  
  ── 33. Error: ascend_to_root (@root.R#249)  ────────────────────────────────────
  id(23) is not present in given parse-data.
  Backtrace:
   1. testthat::expect_equal(ascend_to_root(id = 23, pd), 23)
   4. parsetools:::ascend_to_root(id = 23, pd)
   5. parsetools:::._check_id(id, pd) /data/gannet/ripley/R/packages/tests-clang/parsetools/R/root.R:237:8
  
  ══ testthat results  ═══════════════════════════════════════════════════════════
  [ OK: 524 | SKIPPED: 0 | WARNINGS: 0 | FAILED: 33 ]
  1. Failure: token (@accessors.R#48) 
  2. Failure: text (@accessors.R#64) 
  3. Failure: prev_terminal (@accessors.R#252) 
  4. Failure: children (@children.R#103) 
  5. Failure: children (@children.R#108) 
  6. Failure: children (@children.R#113) 
  7. Failure: children (@children.R#120) 
  8. Failure: children (@children.R#129) 
  9. Error: get_children_pd (@children.R#166) 
  1. ...
  
  Error: testthat unit tests failed
  Execution halted