tests/testthat/test-stepDiff.R

print("This is the beginning of test-stepDiff")

test_that("degree either 0 or 1", {
  expect_error(stepDiff(image = sar, bandwidth = 4, degree = 2.7))
  expect_no_error(stepDiff(image = matrix(0, 10, 10), bandwidth = 3,
                           degree = 0))
  expect_no_error(stepDiff(image = matrix(0, 10, 10), bandwidth = 3, degree = 0,
                           blur = TRUE))
  expect_no_error(stepDiff(image = matrix(0, 10, 10), bandwidth = 3,
                           degree = 1))
  expect_no_error(stepDiff(image = matrix(0, 10, 10), bandwidth = 3, degree = 1,
                           blur = TRUE))
})

print("This is the end of test-stepDiff")

Try the DRIP package in your browser

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

DRIP documentation built on April 4, 2025, 12:31 a.m.