File: test-R6.R

package info (click to toggle)
r-cran-covr 3.5.1%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 984 kB
  • sloc: javascript: 238; cpp: 54; ansic: 48; xml: 41; sh: 18; makefile: 11
file content (10 lines) | stat: -rw-r--r-- 321 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
context("R6")

test_that("R6 methods coverage is reported", {
  cov <- as.data.frame(package_coverage("TestR6"))

  expect_equal(cov$value, c(5, 2, 3, 1, 1, 0))
  expect_equal(cov$first_line, c(5, 6, 8, 16, 19, 27))
  expect_equal(cov$last_line, c(5, 6, 8, 16, 19, 27))
  expect_true("some_method" %in% cov$functions)
})