File tree 2 files changed +3
-3
lines changed
2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -990,7 +990,7 @@ combine_elements <- function(e1, e2) {
990
990
991
991
# If e2 is 'richer' than e1, fill e2 with e1 parameters
992
992
is_subclass <- ! any(inherits(e2 , class(e1 ), which = TRUE ) == 0 )
993
- is_subclass <- is_subclass && length(setdiff(class(e2 ), class(e1 )) > 0 )
993
+ is_subclass <- is_subclass && length(setdiff(class(e2 ), class(e1 ))) > 0
994
994
if (is_subclass ) {
995
995
new <- defaults(e1 , e2 )
996
996
e2 [names(new )] <- new
Original file line number Diff line number Diff line change @@ -148,10 +148,10 @@ test_that("layer warns for constant aesthetics", {
148
148
test_that(" layer names can be resolved" , {
149
149
150
150
p <- ggplot() + geom_point() + geom_point()
151
- expect_equal(names( p $ layers ) , c(" geom_point" , " geom_point...2" ))
151
+ expect_named( p $ layers , c(" geom_point" , " geom_point...2" ))
152
152
153
153
p <- ggplot() + geom_point(name = " foo" ) + geom_point(name = " bar" )
154
- expect_equal(names( p $ layers ) , c(" foo" , " bar" ))
154
+ expect_named( p $ layers , c(" foo" , " bar" ))
155
155
156
156
l <- geom_point(name = " foobar" )
157
157
expect_snapshot(p + l + l , error = TRUE )
You can’t perform that action at this time.
0 commit comments