Skip to content

Commit a7dab26

Browse files
committed
avoid %+% in test code
1 parent 95cc8e5 commit a7dab26

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

tests/testthat/test-geom-sf.R

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ test_that("geom_sf data type renders appropriate legends", {
197197
)
198198
expect_doppelganger(
199199
"geom_sf point legend",
200-
p %+% data
200+
ggplot_add(data, p)
201201
)
202202

203203
# Line data
@@ -210,7 +210,7 @@ test_that("geom_sf data type renders appropriate legends", {
210210
)
211211
expect_doppelganger(
212212
"geom_sf line legend",
213-
p %+% data
213+
ggplot_add(data, p)
214214
)
215215

216216
# Polygon data
@@ -223,7 +223,7 @@ test_that("geom_sf data type renders appropriate legends", {
223223
)
224224
expect_doppelganger(
225225
"geom_sf polygon legend",
226-
p %+% data
226+
ggplot_add(data, p)
227227
)
228228
})
229229

tests/testthat/test-scales.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ test_that("position scales are updated by all position aesthetics", {
8282
)
8383

8484
base <- ggplot(df, aes(x = 1, y = 1)) + geom_point()
85-
plots <- lapply(aesthetics, function(x) base %+% x)
85+
plots <- lapply(aesthetics, ggplot_add, plot = base)
8686
ranges <- lapply(plots, pranges)
8787

8888
lapply(ranges, function(range) {

0 commit comments

Comments
 (0)