Running ‘testthat.R’ [3s/3s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(ggfittext)
  > 
  > test_check("ggfittext")
   ----------- FAILURE REPORT -------------- 
   --- failure: the condition has length > 1 ---
   --- srcref --- 
  : 
   --- package (from environment) --- 
  ggfittext
   --- call from context --- 
  f(...)
   --- call from argument --- 
  if (is.null(data$xmin) & is.null(data$xmax) & class(params$width) != 
      "unit") {
      data$xmin <- data$x - params$width/2
      data$xmax <- data$x + params$width/2
  }
   --- R stacktrace ---
  where 1: f(...)
  where 2: self$geom$setup_data(data, c(self$geom_params, self$aes_params))
  where 3: f(..., self = self)
  where 4: l$compute_geom_1(d)
  where 5: f(l = layers[[i]], d = data[[i]])
  where 6: by_layer(function(l, d) l$compute_geom_1(d))
  where 7: ggplot_build.ggplot(x)
  where 8: ggplot_build(x)
  where 9: print.ggplot(p)
  where 10 at testthat/test-ggtextfit.R#59: print(p)
  where 11: eval_bare(get_expr(quo), get_env(quo))
  where 12: doTryCatch(return(expr), name, parentenv, handler)
  where 13: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  where 14: tryCatchList(expr, classes, parentenv, handlers)
  where 15: tryCatch({
      code
      NULL
  }, error = function(e) e)
  where 16: capture(act$val <- eval_bare(get_expr(quo), get_env(quo)))
  where 17: quasi_capture(enquo(object), capture_error, label = label)
  where 18 at testthat/test-ggtextfit.R#47: expect_error({
      p <- ggplot2::ggplot(testdata, ggplot2::aes(x = xmin, y = ymax, 
          label = vehicle, colour = class))
      p <- p + geom_fit_text(padding.x = 12, min.size = "nottoobigplease", 
          place = "near the top")
      print(p)
  })
  where 19: eval(code, test_env)
  where 20: eval(code, test_env)
  where 21: withCallingHandlers({
      eval(code, test_env)
      if (!handled && !is.null(test)) {
          skip_empty()
      }
  }, expectation = handle_expectation, skip = handle_skip, warning = handle_warning, 
      message = handle_message, error = handle_error)
  where 22: doTryCatch(return(expr), name, parentenv, handler)
  where 23: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  where 24: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
  where 25: doTryCatch(return(expr), name, parentenv, handler)
  where 26: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]), 
      names[nh], parentenv, handlers[[nh]])
  where 27: tryCatchList(expr, classes, parentenv, handlers)
  where 28: tryCatch(withCallingHandlers({
      eval(code, test_env)
      if (!handled && !is.null(test)) {
          skip_empty()
      }
  }, expectation = handle_expectation, skip = handle_skip, warning = handle_warning, 
      message = handle_message, error = handle_error), error = handle_fatal, 
      skip = function(e) {
      })
  where 29: test_code(desc, code, env = parent.frame())
  where 30 at testthat/test-ggtextfit.R#46: test_that("missing aesthetics and bad options don't work", {
      expect_error({
          p <- ggplot2::ggplot(testdata, ggplot2::aes(x = xmin, 
              y = ymax, label = vehicle, colour = class))
          p <- p + geom_fit_text(padding.x = 12, min.size = "nottoobigplease", 
              place = "near the top")
          print(p)
      })
  })
  where 31: eval(code, test_env)
  where 32: eval(code, test_env)
  where 33: withCallingHandlers({
      eval(code, test_env)
      if (!handled && !is.null(test)) {
          skip_empty()
      }
  }, expectation = handle_expectation, skip = handle_skip, warning = handle_warning, 
      message = handle_message, error = handle_error)
  where 34: doTryCatch(return(expr), name, parentenv, handler)
  where 35: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  where 36: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
  where 37: doTryCatch(return(expr), name, parentenv, handler)
  where 38: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]), 
      names[nh], parentenv, handlers[[nh]])
  where 39: tryCatchList(expr, classes, parentenv, handlers)
  where 40: tryCatch(withCallingHandlers({
      eval(code, test_env)
      if (!handled && !is.null(test)) {
          skip_empty()
      }
  }, expectation = handle_expectation, skip = handle_skip, warning = handle_warning, 
      message = handle_message, error = handle_error), error = handle_fatal, 
      skip = function(e) {
      })
  where 41: test_code(NULL, exprs, env)
  where 42: source_file(path, new.env(parent = env), chdir = TRUE, wrap = wrap)
  where 43: force(code)
  where 44: with_reporter(reporter = reporter, start_end_reporter = start_end_reporter, 
      {
          lister$start_file(basename(path))
          source_file(path, new.env(parent = env), chdir = TRUE, 
              wrap = wrap)
          end_context()
      })
  where 45: FUN(X[[i]], ...)
  where 46: lapply(paths, test_file, env = env, reporter = current_reporter, 
      start_end_reporter = FALSE, load_helpers = FALSE, wrap = wrap)
  where 47: force(code)
  where 48: with_reporter(reporter = current_reporter, results <- lapply(paths, 
      test_file, env = env, reporter = current_reporter, start_end_reporter = FALSE, 
      load_helpers = FALSE, wrap = wrap))
  where 49: test_files(paths, reporter = reporter, env = env, stop_on_failure = stop_on_failure, 
      stop_on_warning = stop_on_warning, wrap = wrap)
  where 50: test_dir(path = test_path, reporter = reporter, env = env, filter = filter, 
      ..., stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, 
      wrap = wrap)
  where 51: test_package_dir(package = package, test_path = test_path, filter = filter, 
      reporter = reporter, ..., stop_on_failure = stop_on_failure, 
      stop_on_warning = stop_on_warning, wrap = wrap)
  where 52: test_check("ggfittext")
  
   --- value of length: 2 type: logical ---
  [1]  TRUE FALSE
   --- function from context --- 
  function (data, params) 
  {
      if ("width" %in% names(data)) {
          warning("`width` is now an argument, not an aesthetic, and will be removed in a future version")
      }
      if ("height" %in% names(data)) {
          warning("`height` is now an argument, not an aesthetic, and will be removed in a future version")
      }
      if (!(("xmin" %in% names(data) & "xmax" %in% names(data)) | 
          ("x" %in% names(data)))) {
          stop("geom_fit_text needs either 'xmin' and 'xmax', or 'x'", 
              .call = FALSE)
      }
      if (!("ymin" %in% names(data) & "ymax" %in% names(data) | 
          "y" %in% names(data))) {
          stop("geom_fit_text needs either 'ymin' and 'ymax', or 'y'", 
              .call = FALSE)
      }
      if (is.null(data$xmin) & is.null(data$xmax) & class(params$width) != 
          "unit") {
          data$xmin <- data$x - params$width/2
          data$xmax <- data$x + params$width/2
      }
      if (is.null(data$ymin) & is.null(data$ymax) & class(params$height) != 
          "unit") {
          data$ymin <- data$y - params$height/2
          data$ymax <- data$y + params$height/2
      }
      data
  }
  <bytecode: 0x5612584f3c68>
  <environment: namespace:ggfittext>
   --- function search by body ---
   ----------- END OF FAILURE REPORT -------------- 
  Fatal error: the condition has length > 1