Skip to content

Commit

Permalink
Skip tests of compiled code on windows for version 4.1
Browse files Browse the repository at this point in the history
  • Loading branch information
jimhester committed Oct 9, 2023
1 parent 6629945 commit 82d1a5d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
5 changes: 5 additions & 0 deletions tests/testthat/test-Compiled.R
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
context("Compiled")
test_that("Compiled code coverage is reported including code in headers", {
skip_on_cran()
skip_if(is_windows() && getRversion() == "4.1")

cov <- as.data.frame(package_coverage("TestCompiled", relative_path = TRUE))

simple_cc <- cov[cov$filename == "src/simple.cc", ]
Expand Down Expand Up @@ -32,6 +34,7 @@ test_that("Compiled code coverage is reported including code in headers", {

test_that("Can pass path to relative_path argument", {
skip_on_cran()
skip_if(is_windows() && getRversion() == "4.1")
cov <- as.data.frame(package_coverage("TestCompiled", relative_path = "."))

expect_true(all(unique(cov$filename) %in% c(
Expand All @@ -44,6 +47,7 @@ test_that("Can pass path to relative_path argument", {

test_that("Source code subdirectories are found", {
skip_on_cran()
skip_if(is_windows() && getRversion() == "4.1")
cov <- as.data.frame(package_coverage("TestCompiledSubdir", relative_path = TRUE))

expect_equal(cov[cov$first_line == "9", "value"], 4)
Expand All @@ -59,6 +63,7 @@ test_that("Source code subdirectories are found", {

test_that("Compiled code coverage is reported under non-standard char's", {
skip_on_cran()
skip_if(is_windows() && getRversion() == "4.1")
cov <- as.data.frame(package_coverage("Test+Char/TestCompiled", relative_path = TRUE))

expect_equal(cov[cov$first_line == "9", "value"], 4)
Expand Down
1 change: 1 addition & 0 deletions tests/testthat/test-tally_coverage.R
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
test_that("tally_coverage includes compiled code", {
skip_on_cran()
skip_if(is_windows() && getRversion() == "4.1")

cov <- package_coverage(test_path("TestCompiled"))
tall <- tally_coverage(cov)
Expand Down

0 comments on commit 82d1a5d

Please sign in to comment.