tests/testthat/test-active-binding.r

context("is_active_binding")

test_that("active bindings can be detected", {
  x <- 10
  expect_false(is_active_binding(x))

  x %<a-% runif(1)
  expect_true(is_active_binding(x))

  y <- x
  expect_false(is_active_binding(y))
})

Try the pryr package in your browser

Any scripts or data that you put into this service are public.

pryr documentation built on Jan. 18, 2023, 1:08 a.m.