Running ‘spelling.R’ [0s/0s]
  Running ‘testthat.R’ [13s/16s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(metatools)
  > 
  > test_check("metatools")
  ✔ ADSL dataset successfully selected
  
  v ADAE dataset successfully selected
  
  Not all datasets provided. Only variables from ADSL will be gathered.
  Not all datasets provided. Only variables from ADSL will be gathered.
  v ADSL dataset successfully selected
  
  ✔ ADSL dataset successfully selected
  
  ✔ Metadata successfully imported
  ℹ To use the Metacore object with metatools package, first subset a dataset
    using `metacore::select_dataset()`
  
  DISCONFL has no control terminology
  v Metadata successfully imported
  i Dataset metadata imported with suppressed warnings
  i To use the Metacore object with metatools package, first subset a dataset using `metacore::select_dataset()`
  
  
  Keys uniquely identify records
  ✔ Metadata successfully imported
  ℹ Dataset metadata imported with suppressed warnings
  ℹ To use the Metacore object with metatools package, first subset a dataset
    using `metacore::select_dataset()`
  
  ✔ ADSL dataset successfully selected
  
  ✔ ADSL dataset successfully selected
  
  v AE dataset successfully selected
  
  v DM dataset successfully selected
  
  v DM dataset successfully selected
  
  v Metadata successfully imported
  i Dataset metadata imported with suppressed warnings
  i To use the Metacore object with metatools package, first subset a dataset using `metacore::select_dataset()`
  
  v AE dataset successfully selected
  
  v ADSL dataset successfully selected
  
  [ FAIL 10 | WARN 107 | SKIP 0 | PASS 78 ]
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Error ('test-build.R:11:3'): drop_unspec_vars ───────────────────────────────
  Error in `select(., all_of(man_vars))`: i In argument: `all_of(man_vars)`.
  Caused by error in `all_of()`:
  ! Can't subset elements that don't exist.
  x Elements `AGEGR2` and `AGEGR2N` don't exist.
  ── Failure ('test-build.R:132:4'): add_variables ───────────────────────────────
  add_variables(data, spec) (`actual`) not equal to `data` (`expected`).
  
  `actual` is length 51
  `expected` is length 49
  
  `names(actual)[47:51]`:   "EOSSTT" "DCSREAS" "MMSETOT" "AGEGR2" "AGEGR2N"
  `names(expected)[47:49]`: "EOSSTT" "DCSREAS" "MMSETOT"                   
  
  `actual$AGEGR2` is a character vector (NA, NA, NA, NA, NA, ...)
  `expected$AGEGR2` is absent
  
  `actual$AGEGR2N` is an integer vector (NA, NA, NA, NA, NA, ...)
  `expected$AGEGR2N` is absent
  ── Error ('test-checks.R:14:4'): get_bad_ct works correctly ────────────────────
  Error: We currently don't have the ability to check against external libraries
  Backtrace:
      ▆
   1. ├─testthat::expect_equal(get_bad_ct(data, spec, "DISCONFL"), character(0)) at test-checks.R:14:4
   2. │ └─testthat::quasi_label(enquo(object), label, arg = "object")
   3. │   └─rlang::eval_bare(expr, quo_get_env(quo))
   4. └─metatools::get_bad_ct(data, spec, "DISCONFL")
  ── Error ('test-checks.R:52:4'): check_ct_col works correctly ──────────────────
  Error in `check_ct_col(data, spec, DCSREAS, TRUE)`: The following values should not be present:
   'ADVERSE EVENT', 'STUDY TERMINATED BY SPONSOR', 'DEATH', 'WITHDRAWAL BY SUBJECT', 'PHYSICIAN DECISION', 'PROTOCOL VIOLATION', 'LOST TO FOLLOW-UP', 'LACK OF EFFICACY'
  Backtrace:
      ▆
   1. ├─testthat::expect_equal(...) at test-checks.R:52:4
   2. │ └─testthat::quasi_label(enquo(object), label, arg = "object")
   3. │   └─rlang::eval_bare(expr, quo_get_env(quo))
   4. └─metatools::check_ct_col(data, spec, DCSREAS, TRUE)
  ── Error ('test-checks.R:77:4'): check_ct_data works correctly ─────────────────
  Error: The following variables contained values not found in the control terminology
         Variable (Prohibited Value(s))
  DCSREAS ('ADVERSE EVENT', 'STUDY TERMINATED BY SPONSOR', 'DEATH', 'WITHDRAWAL BY SUBJECT', 'PHYSICIAN DECISION', 'PROTOCOL VIOLATION', 'LOST TO FOLLOW-UP', 'LACK OF EFFICACY')
  Backtrace:
      ▆
   1. ├─testthat::expect_equal(check_ct_data(data, spec), data) at test-checks.R:77:4
   2. │ └─testthat::quasi_label(enquo(object), label, arg = "object")
   3. │   └─rlang::eval_bare(expr, quo_get_env(quo))
   4. └─metatools::check_ct_data(data, spec)
  ── Error ('test-checks.R:96:4'): variable_check works correctly ────────────────
  Error in `check_variables(data, spec)`: The following variables are missing:
  AGEGR2
  AGEGR2N
  Backtrace:
      ▆
   1. ├─testthat::expect_equal(check_variables(data, spec), data) at test-checks.R:96:4
   2. │ └─testthat::quasi_label(enquo(object), label, arg = "object")
   3. │   └─rlang::eval_bare(expr, quo_get_env(quo))
   4. └─metatools::check_variables(data, spec)
  ── Error ('test-checks.R:113:4'): check_unique_keys works as expected ──────────
  Error in `cl$metacore_filter(dataset)`: ADLBHY is not a dataset in the metacore objectFALSE
  Backtrace:
      ▆
   1. └─metatools::build_from_derived(...) at test-checks.R:113:4
   2.   └─metatools:::make_lone_dataset(metacore, dataset_name)
   3.     └─metacore::select_dataset(metacore, dataset_name)
   4.       └─cl$metacore_filter(dataset)
  ── Failure ('test-supp.R:71:4'): make_supp_qual ────────────────────────────────
  `metacore_supp` (`actual`) not equal to `man_supp` (`expected`).
  
  actual vs expected
                       QORIG
  - actual[1, ]      derived
  + expected[1, ]    DERIVED
  - actual[2, ]      derived
  + expected[2, ]    DERIVED
  - actual[3, ]      derived
  + expected[3, ]    DERIVED
  - actual[4, ]      derived
  + expected[4, ]    DERIVED
  - actual[5, ]      derived
  + expected[5, ]    DERIVED
  - actual[6, ]      derived
  + expected[6, ]    DERIVED
  - actual[7, ]      derived
  + expected[7, ]    DERIVED
  - actual[8, ]      derived
  + expected[8, ]    DERIVED
  - actual[9, ]      derived
  + expected[9, ]    DERIVED
  - actual[10, ]     derived
  + expected[10, ]   DERIVED
  and 1181 more ...
  
       actual$QORIG | expected$QORIG                  
   [1] "derived"    - "DERIVED"      [1]              
   [2] "derived"    - "DERIVED"      [2]              
   [3] "derived"    - "DERIVED"      [3]              
   [4] "derived"    - "DERIVED"      [4]              
   [5] "derived"    - "DERIVED"      [5]              
   [6] "derived"    - "DERIVED"      [6]              
   [7] "derived"    - "DERIVED"      [7]              
   [8] "derived"    - "DERIVED"      [8]              
   [9] "derived"    - "DERIVED"      [9]              
  [10] "derived"    - "DERIVED"      [10]             
   ... ...            ...            and 1181 more ...
  ── Failure ('test-supp.R:84:4'): make_supp_qual ────────────────────────────────
  `dm_supp` (`actual`) not equal to `man_dm_supp` (`expected`).
  
  actual vs expected
                       QORIG
  - actual[1, ]      derived
  + expected[1, ]    DERIVED
  - actual[2, ]      derived
  + expected[2, ]    DERIVED
  - actual[3, ]      derived
  + expected[3, ]    DERIVED
  - actual[4, ]      derived
  + expected[4, ]    DERIVED
  - actual[5, ]      derived
  + expected[5, ]    DERIVED
  - actual[6, ]      derived
  + expected[6, ]    DERIVED
  - actual[7, ]      derived
  + expected[7, ]    DERIVED
  - actual[8, ]      derived
  + expected[8, ]    DERIVED
  - actual[9, ]      derived
  + expected[9, ]    DERIVED
  - actual[10, ]     derived
  + expected[10, ]   DERIVED
  and 1187 more ...
  
       actual$QORIG | expected$QORIG                  
   [1] "derived"    - "DERIVED"      [1]              
   [2] "derived"    - "DERIVED"      [2]              
   [3] "derived"    - "DERIVED"      [3]              
   [4] "derived"    - "DERIVED"      [4]              
   [5] "derived"    - "DERIVED"      [5]              
   [6] "derived"    - "DERIVED"      [6]              
   [7] "derived"    - "DERIVED"      [7]              
   [8] "derived"    - "DERIVED"      [8]              
   [9] "derived"    - "DERIVED"      [9]              
  [10] "derived"    - "DERIVED"      [10]             
   ... ...            ...            and 1187 more ...
  ── Failure ('test-supp.R:96:4'): make_supp_qual ────────────────────────────────
  `.` (`actual`) not equal to `man_dm_supp` (`expected`).
  
  actual vs expected
                       QORIG
  - actual[1, ]      derived
  + expected[1, ]    DERIVED
  - actual[2, ]      derived
  + expected[2, ]    DERIVED
  - actual[3, ]      derived
  + expected[3, ]    DERIVED
  - actual[4, ]      derived
  + expected[4, ]    DERIVED
  - actual[5, ]      derived
  + expected[5, ]    DERIVED
  - actual[6, ]      derived
  + expected[6, ]    DERIVED
  - actual[7, ]      derived
  + expected[7, ]    DERIVED
  - actual[8, ]      derived
  + expected[8, ]    DERIVED
  - actual[9, ]      derived
  + expected[9, ]    DERIVED
  - actual[10, ]     derived
  + expected[10, ]   DERIVED
  and 1187 more ...
  
       actual$QORIG | expected$QORIG                  
   [1] "derived"    - "DERIVED"      [1]              
   [2] "derived"    - "DERIVED"      [2]              
   [3] "derived"    - "DERIVED"      [3]              
   [4] "derived"    - "DERIVED"      [4]              
   [5] "derived"    - "DERIVED"      [5]              
   [6] "derived"    - "DERIVED"      [6]              
   [7] "derived"    - "DERIVED"      [7]              
   [8] "derived"    - "DERIVED"      [8]              
   [9] "derived"    - "DERIVED"      [9]              
  [10] "derived"    - "DERIVED"      [10]             
   ... ...            ...            and 1187 more ...
  Backtrace:
      ▆
   1. ├─... %>% expect_equal(man_dm_supp) at test-supp.R:96:4
   2. └─testthat::expect_equal(., man_dm_supp)
  
  [ FAIL 10 | WARN 107 | SKIP 0 | PASS 78 ]
  Error: Test failures
  Execution halted