Skip to content

Commit

Permalink
fixing linter
Browse files Browse the repository at this point in the history
  • Loading branch information
kartikeya committed Aug 7, 2023
1 parent 852297d commit 5f97b4b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/testthat/test-utils.R
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ test_that("apply_plot_modifications correctly modifies plot objects", {

# Test case 1: Modify ggplot object with dblclicking enabled
modified_ggplot <- apply_plot_modifications(ggplot_obj, "gg", TRUE, list(x = c(4, 7), y = c(2, 4)))
expect_true(identical(class(modified_ggplot), class(ggplot_obj))) # Check class of modified object
expect_true(identical(class(modified_ggplot), class(ggplot_obj)))

# Test case 2: Modify ggplot object with dblclicking disabled
modified_ggplot <- apply_plot_modifications(ggplot_obj, "gg", FALSE, list(x = c(4, 7), y = c(2, 4)))
expect_true(identical(class(modified_ggplot), class(ggplot_obj))) # Check class of modified object
expect_true(identical(class(modified_ggplot), class(ggplot_obj)))

# Test case 3: Modify grob object
grob_obj <- grid::rectGrob()
Expand All @@ -22,5 +22,5 @@ test_that("apply_plot_modifications correctly modifies plot objects", {

# Test case 4: Do not modify plot object
unchanged_plot <- apply_plot_modifications(ggplot_obj, "other_type", TRUE, list(x = c(4, 7), y = c(2, 4)))
expect_true(identical(unchanged_plot, ggplot_obj)) # Check if plot object remains unchanged
expect_true(identical(unchanged_plot, ggplot_obj))
})

0 comments on commit 5f97b4b

Please sign in to comment.