tests/testthat/test-use_dev_extendr.R

test_that("`use_dev_extendr = TRUE` works together with `features`", {
  rust_function(
    "fn uses_either() -> Either<Rint, Rfloat> { Either::Left(Rint::from(42i32)) }",
    features = "either",
    use_dev_extendr = TRUE,
    quiet = TRUE # Suppresses warnings while the feature is still experimental
  )

  expect_equal(42L, uses_either())
})

Try the rextendr package in your browser

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

rextendr documentation built on July 9, 2023, 5:54 p.m.