tests/testthat/test-frequentdirections.R

context("test-frequentdirections.R")

test_that("all_zero_row_index() works", {
  eps <- 10^(-3)
  x <- matrix(c(1,1,0,10^(-6),2,2), nrow = 3, byrow = TRUE)
  testthat::expect_equal(all_zero_row_index(x, 10^(-3)), 2)
  testthat::expect_equal(all_zero_row_index(x, 10^(-8)), integer(0))
})
shinichi-takayanagi/frequentdirections documentation built on May 12, 2019, 12:28 a.m.