@@ -8,25 +8,25 @@ test_that("Can create variable_choices with datasets with no or missing labels",
88
99 # no labels given
1010 choice_1 <- variable_choices(example_data , fill = TRUE )
11- expect_equal(names(choice_1 ), c(" USUBJID: USUBJID" , " STUDYID: STUDYID" ))
11+ testthat :: expect_equal(names(choice_1 ), c(" USUBJID: USUBJID" , " STUDYID: STUDYID" ))
1212
1313 # one missing label
1414 missing_one_label_data <- example_data
1515 teal.data :: col_labels(missing_one_label_data ) <- c(as.character(NA ), " Label" )
1616 choice_2 <- variable_choices(missing_one_label_data , fill = FALSE )
17- expect_equal(names(choice_2 ), c(" USUBJID: Label Missing" , " STUDYID: Label" ))
17+ testthat :: expect_equal(names(choice_2 ), c(" USUBJID: Label Missing" , " STUDYID: Label" ))
1818
1919 # all missing label
2020 missing_two_label_data <- example_data
2121 teal.data :: col_labels(missing_two_label_data ) <- c(as.character(NA ), as.character(NA ))
2222 choice_2 <- variable_choices(missing_two_label_data , fill = FALSE )
23- expect_equal(names(choice_2 ), c(" USUBJID: Label Missing" , " STUDYID: Label Missing" ))
23+ testthat :: expect_equal(names(choice_2 ), c(" USUBJID: Label Missing" , " STUDYID: Label Missing" ))
2424})
2525
2626test_that(" delayed version of variable_choices" , {
2727 # hard-coded subset
2828 obj <- variable_choices(" ADSL" , subset = c(" SEX" , " ARMCD" , " COUNTRY" ))
29- expect_equal(
29+ testthat :: expect_equal(
3030 obj ,
3131 structure(
3232 list (data = " ADSL" , subset = c(" SEX" , " ARMCD" , " COUNTRY" ), key = NULL ),
@@ -38,14 +38,14 @@ test_that("delayed version of variable_choices", {
3838 key_list <- list (ADSL = c(" STUDYID" , " USUBJID" ), ADTTE = c(" STUDYID" , " USUBJID" , " PARAMCD" ))
3939
4040 res_obj <- isolate(resolve(obj , datasets = data_list , keys = key_list ))
41- expect_equal(
41+ testthat :: expect_equal(
4242 res_obj ,
4343 variable_choices(ADSL , subset = c(" SEX" , " ARMCD" , " COUNTRY" ))
4444 )
4545
4646 # functional subset
4747 obj <- variable_choices(" ADSL" , subset = function (data ) colnames(data )[1 : 2 ])
48- expect_equal(
48+ testthat :: expect_equal(
4949 obj ,
5050 structure(
5151 list (data = " ADSL" , subset = function (data ) colnames(data )[1 : 2 ], key = NULL ),
@@ -54,14 +54,14 @@ test_that("delayed version of variable_choices", {
5454 )
5555
5656 res_obj <- isolate(resolve(obj , datasets = data_list , keys = key_list ))
57- expect_equal(
57+ testthat :: expect_equal(
5858 res_obj ,
5959 variable_choices(ADSL , subset = colnames(ADSL )[1 : 2 ], key = c(" STUDYID" , " USUBJID" ))
6060 )
6161
6262 # non-null key value
6363 obj <- variable_choices(" ADSL" , key = c(" USUBJID" , " STUDYID" ))
64- expect_equal(
64+ testthat :: expect_equal(
6565 obj ,
6666 structure(
6767 list (data = " ADSL" , subset = NULL , key = c(" USUBJID" , " STUDYID" )),
@@ -70,7 +70,7 @@ test_that("delayed version of variable_choices", {
7070 )
7171
7272 res_obj <- isolate(resolve(obj , datasets = data_list , keys = key_list ))
73- expect_equal(
73+ testthat :: expect_equal(
7474 res_obj ,
7575 variable_choices(ADSL , key = c(" USUBJID" , " STUDYID" ))
7676 )
@@ -80,7 +80,7 @@ test_that("delayed version of variable_choices", {
8080test_that(" delayed version of variable_choices - resolve_delayed" , {
8181 # hard-coded subset
8282 obj <- variable_choices(" ADSL" , subset = c(" SEX" , " ARMCD" , " COUNTRY" ))
83- expect_equal(
83+ testthat :: expect_equal(
8484 obj ,
8585 structure(
8686 list (data = " ADSL" , subset = c(" SEX" , " ARMCD" , " COUNTRY" ), key = NULL ),
@@ -89,15 +89,15 @@ test_that("delayed version of variable_choices - resolve_delayed", {
8989 )
9090
9191 res_obj <- isolate(resolve_delayed(obj , datasets = data_list , keys = primary_keys_list ))
92- expect_equal(
92+ testthat :: expect_equal(
9393 res_obj ,
9494 variable_choices(ADSL , subset = c(" SEX" , " ARMCD" , " COUNTRY" ))
9595 )
9696
9797
9898 # functional subset
9999 obj <- variable_choices(" ADSL" , subset = function (data ) colnames(data )[1 : 2 ])
100- expect_equal(
100+ testthat :: expect_equal(
101101 obj ,
102102 structure(
103103 list (data = " ADSL" , subset = function (data ) colnames(data )[1 : 2 ], key = NULL ),
@@ -106,14 +106,14 @@ test_that("delayed version of variable_choices - resolve_delayed", {
106106 )
107107
108108 res_obj <- isolate(resolve_delayed(obj , datasets = data_list , keys = primary_keys_list ))
109- expect_equal(
109+ testthat :: expect_equal(
110110 res_obj ,
111111 variable_choices(ADSL , subset = colnames(ADSL )[1 : 2 ], key = c(" STUDYID" , " USUBJID" ))
112112 )
113113
114114 # non-null key value
115115 obj <- variable_choices(" ADSL" , key = c(" USUBJID" , " STUDYID" ))
116- expect_equal(
116+ testthat :: expect_equal(
117117 obj ,
118118 structure(
119119 list (data = " ADSL" , subset = NULL , key = c(" USUBJID" , " STUDYID" )),
@@ -122,7 +122,7 @@ test_that("delayed version of variable_choices - resolve_delayed", {
122122 )
123123
124124 res_obj <- isolate(resolve_delayed(obj , datasets = data_list , keys = primary_keys_list ))
125- expect_equal(
125+ testthat :: expect_equal(
126126 res_obj ,
127127 variable_choices(ADSL , key = c(" USUBJID" , " STUDYID" ))
128128 )
0 commit comments