-
Notifications
You must be signed in to change notification settings - Fork 118
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #586 from r-lib/S7-external-generics
Add support for S7 methods registered for external generics
- Loading branch information
Showing
6 changed files
with
81 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# S7 coverage is reported | ||
|
||
Code | ||
cov[, c("functions", "first_line", "last_line", "value")] | ||
Output | ||
functions first_line last_line value | ||
1 Range@properties$length$getter 9 9 1 | ||
2 Range@properties$length$setter 11 11 1 | ||
3 Range@properties$length$setter 12 12 1 | ||
4 Range 17 17 2 | ||
5 Range@validator 20 20 5 | ||
6 Range@validator 21 21 0 | ||
7 Range@validator 22 22 5 | ||
8 Range@validator 23 23 0 | ||
9 Range@validator 24 24 5 | ||
10 Range@validator 25 25 1 | ||
11 method(inside, TestS7::Range) 34 34 1 | ||
12 method(base::format, TestS7::Range) 43 43 2 | ||
13 method(testthat::testthat_print, TestS7::Range) 48 48 1 | ||
14 method(testthat::testthat_print, TestS7::Range) 49 49 1 | ||
15 .onLoad 53 53 0 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
test_that("S7 coverage is reported", { | ||
local_edition(3) | ||
cov <- as.data.frame(package_coverage(test_path("TestS7"))) | ||
|
||
expect_equal(cov$value, c(1, 1, 1, 1, 4, 0, 4, 0, 4, 1, 1)) | ||
expect_equal(cov$value, c(1, 1, 1, 2, 5, 0, 5, 0, 5, 1, 1, 2, 1, 1, 0)) | ||
expect_snapshot(cov[, c("functions", "first_line", "last_line", "value")]) | ||
}) |