tests/testthat/test-distExt.R

context("Function .getDistExt")

test_that(".getDistExt", {
  library(data.table)
  library(quadprog)
  object <- readRDS(system.file("testdata/object.rds", package = "fbClust"))

  PL <- object[[4]]
  x0 <- object[[1]]
  ram <- object[[6]]
  Dmat <- diag(1, nrow = nrow(x0))
  Ax0 <- object[[3]]

  res <- .getDistExt(V1 = x0, PL = -t(PL) , ram = ram, Dmat = Dmat)
  expect_true(res < 496 & res > 494)
})
rte-antares-rpackage/fbClust documentation built on Sept. 6, 2019, 8:42 a.m.