Running 'testthat.R' [84s]
Running the tests in 'tests/testthat.R' failed.
Complete output:
  > library(testthat)
  > library(ggh4x)
  Loading required package: ggplot2
  > 
  > test_check("ggh4x")
  [ FAIL 32 | WARN 0 | SKIP 18 | PASS 750 ]
  
  ══ Skipped tests (18) ══════════════════════════════════════════════════════════
  • On CRAN (18): 'test-facet_grid2.R:93:3', 'test-facet_manual.R:24:3',
    'test-facet_manual.R:95:3', 'test-facetted_pos_scales.R:330:3',
    'test-facetted_pos_scales.R:341:3', 'test-facetted_pos_scales.R:359:3',
    'test-geom_outline_point.R:17:3', 'test-guide_axis_manual.R:129:5',
    'test-guide_axis_manual.R:138:3', 'test-scale_colour_multi.R:250:3',
    'test-scale_fill_multi.R:251:3', 'test-scale_listed.R:199:3',
    'test-scale_listed.R:203:3', 'test-scale_listed.R:207:3',
    'test-scale_listed.R:211:3', 'test-scale_listed.R:218:3',
    'test-strips.R:121:3', 'test-strips.R:126:3'
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Failure ('test-coord_axes_inside.R:23:5'): coord_axis_inside can place axes inside ──
  axis$grobs[[1]] inherits from 'titleGrob'/'gTree'/'grob'/'gDesc' not 'zeroGrob'.
  ── Failure ('test-coord_axes_inside.R:24:5'): coord_axis_inside can place axes inside ──
  axis$grobs[[2]] inherits from 'zeroGrob'/'grob'/'gDesc' not 'titleGrob'.
  ── Failure ('test-facet_grid2.R:28:5'): facet_grid2 can duplicate axes and remove labels ──
  `b` (`actual`) not equal to c(3L, 3L, 3L, 3L) (`expected`).
  
    `actual`: 2 2 2 2
  `expected`: 3 3 3 3
  ── Failure ('test-facet_grid2.R:29:5'): facet_grid2 can duplicate axes and remove labels ──
  `l` (`actual`) not equal to c(2L, 2L, 3L, 3L) (`expected`).
  
    `actual`: 1 1 2 2
  `expected`: 2 2 3 3
  ── Failure ('test-facet_wrap2.R:106:5'): facet_wrap2() can remove some labels ──
  nchildren(case1, "b") (`actual`) not equal to rep(3L, 6) (`expected`).
  
    `actual`: 2 2 2 2 2 2
  `expected`: 3 3 3 3 3 3
  ── Failure ('test-facet_wrap2.R:107:5'): facet_wrap2() can remove some labels ──
  nchildren(case2, "b") (`actual`) not equal to c(3L, 3L, 3L, 2L, 2L, 2L) (`expected`).
  
    `actual`: 2 2 2 1 1 1
  `expected`: 3 3 3 2 2 2
  ── Failure ('test-facet_wrap2.R:108:5'): facet_wrap2() can remove some labels ──
  nchildren(ctrl1, "b") (`actual`) not equal to c(3L, 3L, 3L, 0L, 0L, 0L) (`expected`).
  
    `actual`: 2 2 2 0 0 0
  `expected`: 3 3 3 0 0 0
  ── Failure ('test-facet_wrap2.R:109:5'): facet_wrap2() can remove some labels ──
  nchildren(ctrl2, "b") (`actual`) not equal to rep(3L, 6) (`expected`).
  
    `actual`: 2 2 2 2 2 2
  `expected`: 3 3 3 3 3 3
  ── Failure ('test-facet_wrap2.R:119:5'): facet_wrap2() can remove some labels ──
  nchildren(case1, "l") (`actual`) not equal to c(2L, 2L, 2L, 2L, 3L, 3L) (`expected`).
  
    `actual`: 1 1 1 1 2 2
  `expected`: 2 2 2 2 3 3
  ── Failure ('test-facet_wrap2.R:120:5'): facet_wrap2() can remove some labels ──
  nchildren(case2, "l") (`actual`) not equal to rep(3L, 6) (`expected`).
  
    `actual`: 2 2 2 2 2 2
  `expected`: 3 3 3 3 3 3
  ── Failure ('test-facet_wrap2.R:121:5'): facet_wrap2() can remove some labels ──
  nchildren(ctrl1, "l") (`actual`) not equal to c(0L, 0L, 0L, 0L, 3L, 3L) (`expected`).
  
    `actual[2:6]`: 0 0 0 2 2
  `expected[2:6]`: 0 0 0 3 3
  ── Failure ('test-facet_wrap2.R:122:5'): facet_wrap2() can remove some labels ──
  nchildren(ctrl2, "l") (`actual`) not equal to rep(3L, 6) (`expected`).
  
    `actual`: 2 2 2 2 2 2
  `expected`: 3 3 3 3 3 3
  ── Failure ('test-facetted_pos_scales.R:163:3'): facetted_pos_scales can set limits ──
  identical(a[[2]], b[[2]]) is not FALSE
  
  `actual`:   TRUE 
  `expected`: FALSE
  ── Failure ('test-facetted_pos_scales.R:166:3'): facetted_pos_scales can set limits ──
  b[[2]] (`actual`) not identical to as.character(seq(0, 100, by = 25)) (`expected`).
  
  `actual` is NULL
  `expected` is a character vector ('0', '25', '50', '75', '100')
  ── Failure ('test-facetted_pos_scales.R:180:3'): facetted_pos_scales can set breaks ──
  identical(a[[2]], b[[2]]) is not FALSE
  
  `actual`:   TRUE 
  `expected`: FALSE
  ── Failure ('test-facetted_pos_scales.R:183:3'): facetted_pos_scales can set breaks ──
  length(a[[2]]) == 3 is not TRUE
  
  `actual`:   FALSE
  `expected`: TRUE 
  ── Failure ('test-facetted_pos_scales.R:184:3'): facetted_pos_scales can set breaks ──
  length(b[[2]]) == 2 is not TRUE
  
  `actual`:   FALSE
  `expected`: TRUE 
  ── Failure ('test-facetted_pos_scales.R:197:3'): facetted_pos_scales can set labels ──
  identical(a[[2]], b[[2]]) is not FALSE
  
  `actual`:   TRUE 
  `expected`: FALSE
  ── Failure ('test-facetted_pos_scales.R:200:3'): facetted_pos_scales can set labels ──
  b[[2]] (`actual`) not identical to as.character(c(200, 250, 300)) (`expected`).
  
  `actual` is NULL
  `expected` is a character vector ('200', '250', '300')
  ── Failure ('test-facetted_pos_scales.R:212:3'): facetted_pos_scales can set expand arguments ──
  identical(a[[2]], b[[2]]) is not FALSE
  
  `actual`:   TRUE 
  `expected`: FALSE
  ── Failure ('test-facetted_pos_scales.R:215:3'): facetted_pos_scales can set expand arguments ──
  b[[2]] (`actual`) not identical to as.character(c(-10, 0, 10)) (`expected`).
  
  `actual` is NULL
  `expected` is a character vector ('-10', '0', '10')
  ── Failure ('test-facetted_pos_scales.R:241:3'): facetted_pos_scales can set position arguments ──
  identical(a[[2]], b[[2]]) is not FALSE
  
  `actual`:   TRUE 
  `expected`: FALSE
  ── Failure ('test-facetted_pos_scales.R:243:3'): facetted_pos_scales can set position arguments ──
  c[[2]] (`actual`) not identical to a[[2]] (`expected`).
  
  `actual` is a character vector ('2.0', '2.5', '3.0')
  `expected` is NULL
  ── Failure ('test-facetted_pos_scales.R:277:3'): facetted_pos_scales can set secondary axis ──
  c[[2]] (`actual`) not identical to a[[2]] (`expected`).
  
  `actual` is a character vector ('2.0', '2.5', '3.0')
  `expected` is NULL
  ── Error ('test-guide_axis_logticks.R:115:5'): guide_axis_logticks errors upon misuse ──
  Error in `guides_train(scales = scales$non_position_scales(), theme = theme, 
      guides = guides, labels = labels)`: Guide `axis` cannot be used for colour.
  Backtrace:
       ▆
    1. ├─testthat::expect_snapshot_warning(ggplotGrob(g)) at test-guide_axis_logticks.R:115:4
    2. │ └─testthat:::expect_snapshot_condition(...)
    3. │   ├─testthat:::with_is_snapshotting(...)
    4. │   └─testthat:::capture_matching_condition(x, cnd_matcher(class))
    5. │     └─base::withCallingHandlers(...)
    6. └─ggplot2::ggplotGrob(g)
    7.   ├─ggplot2::ggplot_gtable(ggplot_build(x))
    8.   └─ggplot2:::ggplot_gtable.ggplot_built(ggplot_build(x))
    9.     └─ggplot2:::build_guides(...)
   10.       └─ggplot2:::guides_train(...)
   11.         └─cli::cli_abort("Guide {.var {guide$name}} cannot be used for {.field {scale$aesthetics}}.")
   12.           └─rlang::abort(...)
  ── Error ('test-guide_axis_minor.R:38:5'): guide_axis_minor works on y-scales ──
  Error in `upgradeUnit.default(x)`: Not a unit object
  Backtrace:
      ▆
   1. └─grid::convertX(ctrl$grobs[[1]]$x, "cm", valueOnly = TRUE) at test-guide_axis_minor.R:38:4
   2.   └─grid::convertUnit(...)
   3.     ├─grid:::upgradeUnit(x)
   4.     └─grid:::upgradeUnit.default(x)
  ── Error ('test-guide_axis_minor.R:57:5'): guide_axis_minor works on top x-scales ──
  Error in `upgradeUnit.default(x)`: Not a unit object
  Backtrace:
      ▆
   1. └─grid::convertX(ctrl$grobs[[1]]$y, "cm", valueOnly = TRUE) at test-guide_axis_minor.R:57:4
   2.   └─grid::convertUnit(...)
   3.     ├─grid:::upgradeUnit(x)
   4.     └─grid:::upgradeUnit.default(x)
  ── Error ('test-guide_axis_minor.R:108:5'): guide_axis_minor errors upon misuse ──
  Error in `guides_train(scales = scales$non_position_scales(), theme = theme, 
      guides = guides, labels = labels)`: Guide `axis` cannot be used for colour.
  Backtrace:
       ▆
    1. ├─testthat::expect_snapshot_warning(ggplotGrob(g)) at test-guide_axis_minor.R:108:4
    2. │ └─testthat:::expect_snapshot_condition(...)
    3. │   ├─testthat:::with_is_snapshotting(...)
    4. │   └─testthat:::capture_matching_condition(x, cnd_matcher(class))
    5. │     └─base::withCallingHandlers(...)
    6. └─ggplot2::ggplotGrob(g)
    7.   ├─ggplot2::ggplot_gtable(ggplot_build(x))
    8.   └─ggplot2:::ggplot_gtable.ggplot_built(ggplot_build(x))
    9.     └─ggplot2:::build_guides(...)
   10.       └─ggplot2:::guides_train(...)
   11.         └─cli::cli_abort("Guide {.var {guide$name}} cannot be used for {.field {scale$aesthetics}}.")
   12.           └─rlang::abort(...)
  ── Error ('test-guide_axis_nested.R:95:5'): guide_axis_nested errors upon misuse ──
  Error in `guides_train(scales = scales$non_position_scales(), theme = theme, 
      guides = guides, labels = labels)`: Guide `axis` cannot be used for fill.
  Backtrace:
       ▆
    1. ├─testthat::expect_snapshot_warning(ggplotGrob(g)) at test-guide_axis_nested.R:95:4
    2. │ └─testthat:::expect_snapshot_condition(...)
    3. │   ├─testthat:::with_is_snapshotting(...)
    4. │   └─testthat:::capture_matching_condition(x, cnd_matcher(class))
    5. │     └─base::withCallingHandlers(...)
    6. └─ggplot2::ggplotGrob(g)
    7.   ├─ggplot2::ggplot_gtable(ggplot_build(x))
    8.   └─ggplot2:::ggplot_gtable.ggplot_built(ggplot_build(x))
    9.     └─ggplot2:::build_guides(...)
   10.       └─ggplot2:::guides_train(...)
   11.         └─cli::cli_abort("Guide {.var {guide$name}} cannot be used for {.field {scale$aesthetics}}.")
   12.           └─rlang::abort(...)
  ── Error ('test-guide_stringlegend.R:19:3'): guide_stringlegend can be placed in different spots ──
  Error in `legend$train(guide, scale, aesthetic)`: attempt to apply non-function
  Backtrace:
      ▆
   1. └─ggplot2::ggplotGrob(test) at test-guide_stringlegend.R:19:2
   2.   ├─ggplot2::ggplot_gtable(ggplot_build(x))
   3.   └─ggplot2:::ggplot_gtable.ggplot_built(ggplot_build(x))
   4.     └─ggplot2:::build_guides(...)
   5.       └─ggplot2:::guides_train(...)
   6.         ├─ggplot2::guide_train(guide, scale, output)
   7.         └─ggh4x:::guide_train.stringlegend(guide, scale, output)
  ── Error ('test-scale_colour_multi.R:201:3'): scale_colour_multi sets labels independently ──
  <subscriptOutOfBoundsError/error/condition>
  Error in `tg$grobs[tg$layout$name == i][[1]]`: subscript out of bounds
  Backtrace:
      ▆
   1. └─base::lapply(...) at test-scale_colour_multi.R:201:2
   2.   └─ggh4x (local) FUN(X[[i]], ...)
  ── Error ('test-scale_fill_multi.R:201:3'): scale_fill_multi sets labels independently ──
  <subscriptOutOfBoundsError/error/condition>
  Error in `tg$grobs[tg$layout$name == i][[1]]`: subscript out of bounds
  Backtrace:
      ▆
   1. └─base::lapply(...) at test-scale_fill_multi.R:201:2
   2.   └─ggh4x (local) FUN(X[[i]], ...)
  
  [ FAIL 32 | WARN 0 | SKIP 18 | PASS 750 ]
  Deleting unused snapshots:
  • facet_manual/removable-whitespace.svg
  Error: Test failures
  Execution halted