@@ -21,7 +21,7 @@ test_that("as_facets_list() coerces character vectors", {
21
21
22
22
expect_identical(as_facets_list(" foo" ), list (foobar [1 ]))
23
23
expect_identical(as_facets_list(c(" foo" , " bar" )), list (foobar [1 ], foobar [2 ]))
24
- expect_identical(wrap_as_facets_list (c(" foo" , " bar" )), foobar )
24
+ expect_identical(compact_facets (c(" foo" , " bar" )), foobar )
25
25
})
26
26
27
27
test_that(" as_facets_list() coerces lists" , {
@@ -47,12 +47,12 @@ test_that("facets reject aes()", {
47
47
expect_error(facet_grid(aes(foo )), " Please use `vars()` to supply facet variables" , fixed = TRUE )
48
48
})
49
49
50
- test_that(" wrap_as_facets_list () returns a quosures object with compacted" , {
51
- expect_identical(wrap_as_facets_list (vars(foo )), quos(foo = foo ))
52
- expect_identical(wrap_as_facets_list (~ foo + bar ), quos(foo = foo , bar = bar ))
50
+ test_that(" compact_facets () returns a quosures object with compacted" , {
51
+ expect_identical(compact_facets (vars(foo )), quos(foo = foo ))
52
+ expect_identical(compact_facets (~ foo + bar ), quos(foo = foo , bar = bar ))
53
53
54
54
f <- function (x ) {
55
- expect_identical(wrap_as_facets_list (vars(foo , {{ x }}, bar )), quos(foo = foo , bar = bar ))
55
+ expect_identical(compact_facets (vars(foo , {{ x }}, bar )), quos(foo = foo , bar = bar ))
56
56
}
57
57
58
58
f(NULL )
@@ -71,12 +71,12 @@ test_that("grid_as_facets_list() returns a list of quosures objects with compact
71
71
f()
72
72
})
73
73
74
- test_that(" wrap_as_facets_list () and grid_as_facets_list() accept empty specs" , {
75
- expect_identical(wrap_as_facets_list (NULL ), quos())
76
- expect_identical(wrap_as_facets_list (list ()), quos())
77
- expect_identical(wrap_as_facets_list (. ~ . ), quos())
78
- expect_identical(wrap_as_facets_list (list (. ~ . )), quos())
79
- expect_identical(wrap_as_facets_list (list (NULL )), quos())
74
+ test_that(" compact_facets () and grid_as_facets_list() accept empty specs" , {
75
+ expect_identical(compact_facets (NULL ), quos())
76
+ expect_identical(compact_facets (list ()), quos())
77
+ expect_identical(compact_facets (. ~ . ), quos())
78
+ expect_identical(compact_facets (list (. ~ . )), quos())
79
+ expect_identical(compact_facets (list (NULL )), quos())
80
80
81
81
expect_identical(grid_as_facets_list(list (), NULL ), list (rows = quos(), cols = quos()))
82
82
expect_identical(grid_as_facets_list(. ~ . , NULL ), list (rows = quos(), cols = quos()))
0 commit comments