Running ‘testthat.R’ [8s/10s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(gasfluxes)
  > 
  > test_check("gasfluxes")
  ── 1. Error: inputCheck does not change its input (@test_checkInput.R#11)  ─────
  SETLENGTH() cannot be applied to an ALTVEC object.
  1: expect_identical(dat, {
         gasfluxes:::checkInput(dat, .id = c("ID", "ID1"), .V = "V", .A = "A", .times = "time", 
             .C = "C")
         dat
     }) at testthat/test_checkInput.R:11
  2: quasi_label(enquo(expected), expected.label)
  3: eval_bare(get_expr(quo), get_env(quo))
  4: gasfluxes:::checkInput(dat, .id = c("ID", "ID1"), .V = "V", .A = "A", .times = "time", 
         .C = "C") at testthat/test_checkInput.R:11
  5: dat[, {
         if (length(unique(get(.V))) > 1) 
             stop(.V, " not unique in flux ID ", paste(mget(.id), collapse = "_"), ".", 
                 call. = FALSE)
         if (length(unique(get(.A))) > 1) 
             stop(.A, " not unique in flux ID ", paste(mget(.id), collapse = "_"), ".", 
                 call. = FALSE)
         if (any(diff(order(get(.times))) != 1L)) 
             stop(.times, " not sorted in flux ID ", paste(mget(.id), collapse = "_"), 
                 ".", call. = FALSE)
         if (anyDuplicated(get(.times))) 
             stop("Duplicated ", .times, " values in flux ID ", paste(mget(.id), collapse = "_"), 
                 ".", call. = FALSE)
     }, by = .id]
  6: `[.data.table`(dat, , {
         if (length(unique(get(.V))) > 1) 
             stop(.V, " not unique in flux ID ", paste(mget(.id), collapse = "_"), ".", 
                 call. = FALSE)
         if (length(unique(get(.A))) > 1) 
             stop(.A, " not unique in flux ID ", paste(mget(.id), collapse = "_"), ".", 
                 call. = FALSE)
         if (any(diff(order(get(.times))) != 1L)) 
             stop(.times, " not sorted in flux ID ", paste(mget(.id), collapse = "_"), 
                 ".", call. = FALSE)
         if (anyDuplicated(get(.times))) 
             stop("Duplicated ", .times, " values in flux ID ", paste(mget(.id), collapse = "_"), 
                 ".", call. = FALSE)
     }, by = .id)
  
  ── 2. Failure: inputCheck catches non-unique V values in flux (@test_checkInput.
  `gasfluxes:::checkInput(...)` threw an error with unexpected message.
  Expected match: "V not unique in flux ID b."
  Actual message: "SETLENGTH() cannot be applied to an ALTVEC object."
  
  ── 3. Failure: inputCheck catches negative V values (@test_checkInput.R#60)  ───
  `gasfluxes:::checkInput(...)` threw an error with unexpected message.
  Expected match: "Not all values in V are > 0."
  Actual message: "SETLENGTH() cannot be applied to an ALTVEC object."
  
  ── 4. Failure: inputCheck catches unsorted time values (@test_checkInput.R#71)  
  `gasfluxes:::checkInput(...)` threw an error with unexpected message.
  Expected match: "time not sorted in flux ID 1."
  Actual message: "SETLENGTH() cannot be applied to an ALTVEC object."
  
  ── 5. Failure: inputCheck catches duplicated time values (@test_checkInput.R#82)
  `gasfluxes:::checkInput(...)` threw an error with unexpected message.
  Expected match: "Duplicated time values in flux ID 1."
  Actual message: "SETLENGTH() cannot be applied to an ALTVEC object."
  
  ══ testthat results  ═══════════════════════════════════════════════════════════
  OK: 11 SKIPPED: 4 FAILED: 5
  1. Error: inputCheck does not change its input (@test_checkInput.R#11) 
  2. Failure: inputCheck catches non-unique V values in flux (@test_checkInput.R#48) 
  3. Failure: inputCheck catches negative V values (@test_checkInput.R#60) 
  4. Failure: inputCheck catches unsorted time values (@test_checkInput.R#71) 
  5. Failure: inputCheck catches duplicated time values (@test_checkInput.R#82) 
  
  Error: testthat unit tests failed
  Execution halted