test_that("all exported symbols exist", {
  expect_true(exists("Gauss2F1", where=asNamespace("ModStatR"), inherits=FALSE))
  expect_true(exists("Gauss2F1gsl", where=asNamespace("ModStatR"), inherits=FALSE))
  expect_true(exists("boot.mcor.ic", where=asNamespace("ModStatR"), inherits=FALSE))
  expect_true(exists("corrdist", where=asNamespace("ModStatR"), inherits=FALSE))
  expect_true(exists("corrdistapprox", where=asNamespace("ModStatR"), inherits=FALSE))
  expect_true(exists("corrdistapprox2", where=asNamespace("ModStatR"), inherits=FALSE))
  expect_true(exists("my.confidence.region", where=asNamespace("ModStatR"), inherits=FALSE))
  expect_true(exists("perm.cor.mtest", where=asNamespace("ModStatR"), inherits=FALSE))
  expect_true(exists("ref.cor.mtest", where=asNamespace("ModStatR"), inherits=FALSE))
  expect_true(exists("ref.cor.test", where=asNamespace("ModStatR"), inherits=FALSE))
  expect_true(exists("rho", where=asNamespace("ModStatR"), inherits=FALSE))
  expect_true(exists("rho.mult", where=asNamespace("ModStatR"), inherits=FALSE))
})

test_that("all exported symbols are callable functions", {
  expect_true(is.function(get("Gauss2F1", envir=asNamespace("ModStatR"))))
  expect_true(is.function(get("Gauss2F1gsl", envir=asNamespace("ModStatR"))))
  expect_true(is.function(get("boot.mcor.ic", envir=asNamespace("ModStatR"))))
  expect_true(is.function(get("corrdist", envir=asNamespace("ModStatR"))))
  expect_true(is.function(get("corrdistapprox", envir=asNamespace("ModStatR"))))
  expect_true(is.function(get("corrdistapprox2", envir=asNamespace("ModStatR"))))
  expect_true(is.function(get("my.confidence.region", envir=asNamespace("ModStatR"))))
  expect_true(is.function(get("perm.cor.mtest", envir=asNamespace("ModStatR"))))
  expect_true(is.function(get("ref.cor.mtest", envir=asNamespace("ModStatR"))))
  expect_true(is.function(get("ref.cor.test", envir=asNamespace("ModStatR"))))
  expect_true(is.function(get("rho", envir=asNamespace("ModStatR"))))
  expect_true(is.function(get("rho.mult", envir=asNamespace("ModStatR"))))
})