tests/testthat/test-shiny_apps.R

context("Shiny apps")

#  here I use the try catch function 
testthat::test_that("in case that the file_path argument of the image_show function is not an array, matrix or path then it returns an error", {
  
  image_array = list(image_array = matrix(runif(25), 5, 5))
  
  testthat::expect_error(imageShow(image_array))
})

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.