Running ‘testthat.R’ [3s/4s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(passt)
  > 
  > test_check("passt")
   ----------- FAILURE REPORT -------------- 
   --- failure: the condition has length > 1 ---
   --- srcref --- 
  : 
   --- package (from environment) --- 
  passt
   --- call from context --- 
  calc_output_sum(patterns, weight_matrix)
   --- call from argument --- 
  if (class(inputs) == "matrix") {
      return(colSums(apply(inputs, 1, function(x) weight_matrix %*% 
          x)))
  }
   --- R stacktrace ---
  where 1: calc_output_sum(patterns, weight_matrix)
  where 2: rbind(output_activation_sum, calc_output_sum(patterns, weight_matrix))
  where 3 at testthat/test-simulation.R#4: run_sim(patterns = diag(10), frequency = 1:10, duration = 10:1, 
      lrate_onset = 0.05, lrate_drop_time = 2, lrate_drop_perc = 0)
  where 4: eval(code, test_env)
  where 5: eval(code, test_env)
  where 6: 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 7: doTryCatch(return(expr), name, parentenv, handler)
  where 8: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  where 9: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
  where 10: doTryCatch(return(expr), name, parentenv, handler)
  where 11: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]), 
      names[nh], parentenv, handlers[[nh]])
  where 12: tryCatchList(expr, classes, parentenv, handlers)
  where 13: 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 14: test_code(NULL, exprs, env)
  where 15: source_file(path, new.env(parent = env), chdir = TRUE, wrap = wrap)
  where 16: force(code)
  where 17: doWithOneRestart(return(expr), restart)
  where 18: withOneRestart(expr, restarts[[1L]])
  where 19: withRestarts(testthat_abort_reporter = function() NULL, force(code))
  where 20: with_reporter(reporter = reporter, start_end_reporter = start_end_reporter, 
      {
          reporter$start_file(basename(path))
          lister$start_file(basename(path))
          source_file(path, new.env(parent = env), chdir = TRUE, 
              wrap = wrap)
          reporter$.end_context()
          reporter$end_file()
      })
  where 21: FUN(X[[i]], ...)
  where 22: lapply(paths, test_file, env = env, reporter = current_reporter, 
      start_end_reporter = FALSE, load_helpers = FALSE, wrap = wrap)
  where 23: force(code)
  where 24: doWithOneRestart(return(expr), restart)
  where 25: withOneRestart(expr, restarts[[1L]])
  where 26: withRestarts(testthat_abort_reporter = function() NULL, force(code))
  where 27: 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 28: test_files(paths, reporter = reporter, env = env, stop_on_failure = stop_on_failure, 
      stop_on_warning = stop_on_warning, wrap = wrap)
  where 29: 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 30: 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 31: test_check("passt")
  
   --- value of length: 2 type: logical ---
  [1]  TRUE FALSE
   --- function from context --- 
  function (inputs, weight_matrix) 
  {
      if (class(inputs) == "matrix") {
          return(colSums(apply(inputs, 1, function(x) weight_matrix %*% 
              x)))
      }
      if (is.vector(inputs) == TRUE) {
          return(sum(weight_matrix %*% inputs))
      }
  }
  <bytecode: 0x562d99e746a0>
  <environment: namespace:passt>
   --- function search by body ---
  Function calc_output_sum in namespace passt has this body.
   ----------- END OF FAILURE REPORT -------------- 
  Fatal error: the condition has length > 1