Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Kirill Müller committed Mar 10, 2016
1 parent b79cd73 commit bf38a63
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion tests/testthat/test-codecov.R
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ test_that("it generates a properly formatted json file", {

expect_match(json$files$name, rex::rex("R", one_of("/", "\\"), "TestS4.R")),
expect_equal(json$files$coverage[[1]],
c(NA, NA, NA, NA, NA, NA, NA, 5, 2, 5, 3, 5, NA, NA, NA, NA, NA, NA, NA, NA, NA,
c(NA, NA, NA, NA, NA, NA, NA, 5, 2, NA, 3, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA,
NA, NA, NA, NA, 1, NA, NA, NA, NA, NA, 1, NA, NA, NA, NA, NA, 1, NA)
),
expect_equal(json$uploader, "R")
Expand Down
4 changes: 2 additions & 2 deletions tests/testthat/test-coveralls.R
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ test_that("coveralls generates a properly formatted json file", {
expect_match(json$source_files$name, rex::rex("R", one_of("/", "\\"), "TestS4.R")),
expect_equal(json$source_files$source, read_file("TestS4/R/TestS4.R")),
expect_equal(json$source_files$coverage[[1]],
c(NA, NA, NA, NA, NA, NA, 5, 2, 5, 3, 5, NA, NA, NA, NA, NA, NA, NA, NA, NA,
c(NA, NA, NA, NA, NA, NA, 5, 2, NA, 3, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA,
NA, NA, NA, NA, 1, NA, NA, NA, NA, NA, 1, NA, NA, NA, NA, NA, 1, NA))
)
)
Expand All @@ -92,7 +92,7 @@ test_that("coveralls can spawn a job using repo_token", {
expect_match(json$source_files$name, rex::rex("R", one_of("/", "\\"), "TestS4.R")),
expect_equal(json$source_files$source, read_file("TestS4/R/TestS4.R")),
expect_equal(json$source_files$coverage[[1]],
c(NA, NA, NA, NA, NA, NA, 5, 2, 5, 3, 5, NA, NA, NA, NA, NA, NA, NA, NA, NA,
c(NA, NA, NA, NA, NA, NA, 5, 2, NA, 3, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA,
NA, NA, NA, NA, 1, NA, NA, NA, NA, NA, 1, NA, NA, NA, NA, NA, 1, NA))
)
)
Expand Down
22 changes: 11 additions & 11 deletions tests/testthat/test-shine.R
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ test_that("it works with coverage objects", {
expect_equal(test_S4$line, 1:38),

expect_equal(test_S4$coverage,
c("", "", "", "", "", "", "5", "2", "5", "3", "5", "", "", "", "", "",
c("", "", "", "", "", "", "5", "2", "", "3", "", "", "", "", "", "",
"", "", "", "", "", "", "", "", "1", "", "", "", "",
"", "1", "", "", "", "", "", "1", "")),

Expand All @@ -19,10 +19,10 @@ test_that("it works with coverage objects", {
Coverage = "<div class=\"coverage-box coverage-high\">100.00</div>",
File = "<a href=\"#\">R/TestS4.R</a>",
Lines = 38L,
Relevant = 8L,
Covered = 8L,
Relevant = 6L,
Covered = 6L,
Missed = 0L,
`Hits / Line` = "3",
`Hits / Line` = "2",
row.names = "R/TestS4.R",
stringsAsFactors = FALSE,
check.names = FALSE))
Expand All @@ -39,7 +39,7 @@ test_that("it works with coverages objects", {
expect_equal(test_S4_test$line, 1:38),

expect_equal(test_S4_test$coverage,
c("", "", "", "", "", "", "5", "2", "5", "3", "5", "", "", "", "", "",
c("", "", "", "", "", "", "5", "2", "", "3", "", "", "", "", "", "",
"", "", "", "", "", "", "", "", "1", "", "", "", "",
"", "1", "", "", "", "", "", "1", "")),

Expand All @@ -48,10 +48,10 @@ test_that("it works with coverages objects", {
Coverage = "<div class=\"coverage-box coverage-high\">100.00</div>",
File = "<a href=\"#\">R/TestS4.R</a>",
Lines = 38L,
Relevant = 8L,
Covered = 8L,
Relevant = 6L,
Covered = 6L,
Missed = 0L,
`Hits / Line` = "3",
`Hits / Line` = "2",
row.names = "R/TestS4.R",
stringsAsFactors = FALSE,
check.names = FALSE)),
Expand All @@ -61,7 +61,7 @@ test_that("it works with coverages objects", {
expect_equal(test_S4_vignette$line, 1:38),

expect_equal(test_S4_vignette$coverage,
c("", "", "", "", "", "", "0", "0", "0", "0", "0", "", "", "", "", "",
c("", "", "", "", "", "", "0", "0", "", "0", "", "", "", "", "", "",
"", "", "", "", "", "", "", "", "0", "", "", "", "", "", "0", "", "",
"", "", "", "0", "")),

Expand All @@ -70,9 +70,9 @@ test_that("it works with coverages objects", {
Coverage = "<div class=\"coverage-box coverage-low\">0.00</div>",
File = "<a href=\"#\">R/TestS4.R</a>",
Lines = 38L,
Relevant = 8L,
Relevant = 6L,
Covered = 0L,
Missed = 8L,
Missed = 6L,
`Hits / Line` = "0",
row.names = "R/TestS4.R",
stringsAsFactors = FALSE,
Expand Down

1 comment on commit bf38a63

@lintr-bot
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

R/parse_data.R:6:1: style: lines should not be more than 120 characters.

​    warning("Parse data not found, coverage may be inaccurate. Try declaring a function in the last file of your R package.",
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/parse_data.R:22:17: style: Variable and function names should be all lowercase.

original[[1]]$parseData <- parse_data[[1L]]
                ^~~~~~~~~

Please sign in to comment.