tests/testthat/test-laplacian_kernels.R

context('Laplacian kernels')


testthat::test_that("it returns a matrix", {
  
  testthat::expect_true(is.matrix(laplacian_kernels(type = 1)))
})

testthat::test_that("type is a number between 1 and 4", {
  
  testthat::expect_error(laplacian_kernels(type = 5))
})

# test various kernel-types


testthat::test_that("it returns a matrix", {
  
  testthat::expect_true(is.matrix(laplacian_kernels(type = 2)))
})

testthat::test_that("it returns a matrix", {
  
  testthat::expect_true(is.matrix(laplacian_kernels(type = 3)))
})

testthat::test_that("it returns a matrix", {
  
  testthat::expect_true(is.matrix(laplacian_kernels(type = 4)))
})

Try the OpenImageR package in your browser

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

OpenImageR documentation built on July 9, 2023, 5:43 p.m.