Skip to content

Commit 6edc407

Browse files
committed
revert any(duplicated()) changes
1 parent 834544a commit 6edc407

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

tests/testthat/test-geom-boxplot.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ test_that("boxes with variable widths do not overlap", {
7373
d <- get_layer_data(p)[c("xmin", "xmax")]
7474
xid <- find_x_overlaps(d)
7575

76-
expect_false(anyDuplicated(xid) > 0)
76+
expect_false(any(duplicated(xid)))
7777
})
7878

7979
test_that("boxplots with a group size >1 error", {

tests/testthat/test-position-dodge2.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ test_that("rectangles are dodged", {
3232
p <- ggplot(df, aes(xmin = xmin, xmax = xmax, ymin = ymin, ymax = ymax)) +
3333
geom_rect(aes(fill = fill), position = "dodge2", alpha = 0.8)
3434

35-
expect_false(anyDuplicated(find_x_overlaps(get_layer_data(p))) > 0)
35+
expect_false(any(duplicated(find_x_overlaps(get_layer_data(p)))))
3636
})
3737

3838
test_that("cols at the same x position are dodged", {
@@ -44,7 +44,7 @@ test_that("cols at the same x position are dodged", {
4444
p <- ggplot(df, aes(1, n, fill = x)) +
4545
geom_col(position = "dodge2", alpha = 0.5)
4646

47-
expect_false(anyDuplicated(find_x_overlaps(get_layer_data(p))) > 0)
47+
expect_false(any(duplicated(find_x_overlaps(get_layer_data(p)))))
4848
})
4949

5050
test_that("padding argument controls space between elements", {

0 commit comments

Comments
 (0)