File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -11,7 +11,11 @@ test_that("Test plot_density", {
1111 plt <- plot_density(fobject )
1212
1313 expect_s3_class(plt , " ggplot" )
14- expect_equal(plt $ labels $ x , " probability" )
14+ if (" get_labs" %in% getNamespaceExports(" ggplot2" )) {
15+ expect_equal(ggplot2 :: get_labs(plt )$ x , " probability" )
16+ } else {
17+ expect_equal(plt $ labels $ x , " probability" )
18+ }
1519 # no bias
1620 set.seed(123 )
1721 data <- data.frame (
@@ -41,5 +45,9 @@ test_that("Test plot_density", {
4145 plt <- plot_density(fobject )
4246
4347 expect_s3_class(plt , " ggplot" )
44- expect_equal(plt $ labels $ x , " predicted values" )
48+ if (" get_labs" %in% getNamespaceExports(" ggplot2" )) {
49+ expect_equal(ggplot2 :: get_labs(plt )$ x , " predicted values" )
50+ } else {
51+ expect_equal(plt $ labels $ x , " predicted values" )
52+ }
4553})
You can’t perform that action at this time.
0 commit comments