File: test-is.R

package info (click to toggle)
r-cran-r6 2.6.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 376 kB
  • sloc: sh: 10; makefile: 2
file content (10 lines) | stat: -rw-r--r-- 315 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
test_that("Checking R6 class objects are recognized correctly by `is.R6()`", {
  Person <- R6Class("Person")
  Bob <- Person$new()
  expect_true(is.R6(Bob))
})

test_that("Checking R6 class generators are recognized correctly by `is.R6Class()`", {
  Person <- R6Class("Person")
  expect_true(is.R6Class(Person))
})