Skip to content

Commit

Permalink
fix: shortened wide roxygen (fixed R CMD note)
Browse files Browse the repository at this point in the history
  • Loading branch information
selkamand committed Nov 13, 2024
1 parent 6cce8b0 commit ee4be83
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 8 deletions.
14 changes: 10 additions & 4 deletions R/assert_set.R
Original file line number Diff line number Diff line change
Expand Up @@ -59,12 +59,18 @@ assert_one_of <- assert_create_chain(
#'
#' @return Returns `invisible(TRUE)` if `x` and `y` contain all the same elements (ignoring order and duplicates), otherwise throws an error.
#' @examples
#' assert_set_equal(c(1, 2, 3), c(3, 2, 1)) # Passes because elements are the same, order doesn't matter
#' assert_set_equal(c("A", "B", "C"), c("C", "A", "B")) # Passes because elements are identical
#' # Passes because elements are the same, order doesn't matter
#' assert_set_equal(c(1, 2, 3), c(3, 2, 1))
#'
#' # Passes because elements are identical
#' assert_set_equal(c("A", "B", "C"), c("C", "A", "B"))
#'
#' try({
#' assert_set_equal(c(1, 2, 3), c(1, 2)) # Throws error because elements are not identical
#' assert_set_equal(c("A", "B"), c("A", "B", "C")) # Throws error because elements differ
#' # Throws error because elements are not identical
#' assert_set_equal(c(1, 2, 3), c(1, 2))
#'
#' # Throws error because elements differ
#' assert_set_equal(c("A", "B"), c("A", "B", "C"))
#' })
#' @export
assert_set_equal <- assert_create(
Expand Down
14 changes: 10 additions & 4 deletions man/assert_set_equal.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit ee4be83

Please sign in to comment.