tests/testthat/test_plot_clust_sc.R

context("test plot_clus_sc")

# Test data input validation
test_that("test error messages", {
  expect_error(plot_clust_sc(), "Argument x is missing")
  expect_error(plot_clust_sc(x = 1:10), "x is not an object that contains")
  expect_error(plot_clust_sc(x = rbind(1:10, 1:10)),
    "x is not an object that contains")
  expect_error(plot_clust_sc(x = data.frame(1:10,
    1:10)), "x is not an object that contains")
  expect_error(plot_clust_sc(x = list(1:10)), "x is not an object that contains")
})
saskiaotto/INDperform documentation built on Oct. 27, 2021, 10:33 p.m.