Skip to content

Commit

Permalink
import backported @ in TestS7 package
Browse files Browse the repository at this point in the history
  • Loading branch information
t-kalinowski committed Nov 7, 2024
1 parent efbbd52 commit f228960
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion tests/testthat/TestS7/DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Description: What the package does (one paragraph).
License: MIT + file LICENSE
Encoding: UTF-8
Roxygen: list(markdown = TRUE)
RoxygenNote: 7.3.1
RoxygenNote: 7.3.2
Imports: S7
Suggests:
testthat (>= 3.0.0)
Expand Down
3 changes: 3 additions & 0 deletions tests/testthat/TestS7/NAMESPACE
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Generated by roxygen2: do not edit by hand

export(Range)
export(inside)
if (getRversion() < "4.3.0") importFrom("S7", "@")
import(S7)
5 changes: 5 additions & 0 deletions tests/testthat/TestS7/R/foo.R
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#' @import S7
#' @export
Range <- new_class("Range",
properties = list(
start = class_double,
Expand Down Expand Up @@ -32,3 +33,7 @@ inside <- new_generic("inside", "x")
method(inside, Range) <- function(x, y) {
y >= x@start & y <= x@end
}

# enable usage of <S7_object>@name in package code
#' @rawNamespace if (getRversion() < "4.3.0") importFrom("S7", "@")
NULL

0 comments on commit f228960

Please sign in to comment.