Skip to content

Commit 71da78c

Browse files
committed
test expectation should account for changes in the default color palette on r-devel
1 parent ba86b9d commit 71da78c

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

tests/testthat/test-ggplot-hline.R

+3-1
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,9 @@ test_that("hline/vline/abline split on linetype/colour/size", {
6868

6969
expect_equivalent(
7070
unique(vapply(l$data, function(x) x$line$color, character(1))),
71-
c("rgba(0,0,0,1)", "rgba(255,0,0,1)", "rgba(0,205,0,1)")
71+
# Default palette colors are changing in R4.0...
72+
# https://github.com/wch/r-source/commit/58eafa7#diff-038aeefcb87409db883f064615187949R2495
73+
toRGB(if (getRversion() >= "4.0.0") c("black", "#DF536B", "#61D04F") else c("black", "red", "green3"))
7274
)
7375

7476
expect_length(

0 commit comments

Comments
 (0)