-
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 branch 'main' into non-API-updates
- Loading branch information
Showing
46 changed files
with
222 additions
and
96 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
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 |
---|---|---|
@@ -1,12 +1,12 @@ | ||
ops <- options("crayon.enabled" = FALSE, warn = 1) | ||
library(testthat) | ||
library("covr") | ||
# This file is part of the standard setup for testthat. | ||
# It is recommended that you do not modify it. | ||
# | ||
# Where should you do additional test configuration? | ||
# Learn more about the roles of various files in: | ||
# * https://r-pkgs.org/testing-design.html#sec-tests-files-overview | ||
# * https://testthat.r-lib.org/articles/special-files.html | ||
|
||
# Skip tests on Solaris as gcc is not in the PATH and I do not have an easy way | ||
# to mimic the CRAN build environment | ||
if (!tolower(Sys.info()[["sysname"]]) == "sunos") { | ||
Sys.setenv("R_TESTS" = "") | ||
test_check("covr") | ||
} | ||
library(testthat) | ||
library(covr) | ||
|
||
options(ops) | ||
test_check("covr") |
1 change: 0 additions & 1 deletion
1
tests/testthat/Test+Char/TestCompiled/tests/testthat/test-TestCompiled.R
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,16 @@ | ||
# Error thrown for missing gcov | ||
|
||
Code | ||
package_coverage("TestCompiled", relative_path = TRUE) | ||
Condition | ||
Error in `run_gcov()`: | ||
! gcov not found | ||
|
||
# Warning thrown for empty gcov output | ||
|
||
Code | ||
. <- package_coverage("TestCompiled", relative_path = TRUE) | ||
Condition | ||
Warning in `run_gcov()`: | ||
parsed gcov output was empty | ||
|
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
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 |
---|---|---|
@@ -1,4 +1,3 @@ | ||
context("RC") | ||
test_that("RC methods coverage is reported", { | ||
cov <- as.data.frame(package_coverage("TestRC")) | ||
|
||
|
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,4 +1,3 @@ | ||
context("S4") | ||
test_that("S4 methods coverage is reported", { | ||
cov <- as.data.frame(package_coverage("TestS4")) | ||
|
||
|
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")]) | ||
}) |
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 |
---|---|---|
@@ -1,5 +1,3 @@ | ||
context("box") | ||
|
||
loaded_mods <- loadNamespace("box")$loaded_mods | ||
rm(list = ls(loaded_mods), envir = loaded_mods) | ||
|
||
|
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 |
---|---|---|
@@ -1,5 +1,3 @@ | ||
context("braceless") | ||
|
||
test_that("if", { | ||
f <- | ||
'f <- function(x) { | ||
|
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 |
---|---|---|
@@ -1,4 +1,3 @@ | ||
context("codecov") | ||
ci_vars <- c( | ||
"APPVEYOR" = NA, | ||
"APPVEYOR_ACCOUNT_NAME" = NA, | ||
|
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 |
---|---|---|
@@ -1,5 +1,3 @@ | ||
context("coveralls") | ||
|
||
ci_vars <- c( | ||
"APPVEYOR" = NA, | ||
"APPVEYOR_BUILD_NUMBER" = NA, | ||
|
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
Oops, something went wrong.