tests/testthat/test-xxhash-utils.R

test_that("hash as raw vector works", {
  
  
  algos <- c('xxh32', 'xxh64', 'xxh128', 'xxh3')
  v <- letters
  
  for (algo in algos) {
      expect_identical(
              xxhash(v, algo = 'xxh128', as_raw = FALSE),
        paste(xxhash(v, algo = 'xxh128', as_raw = TRUE ), collapse = ""),
        label = paste(algo, ":")
      )
  }
  
  
})

Try the xxhashlite package in your browser

Any scripts or data that you put into this service are public.

xxhashlite documentation built on May 29, 2024, 7:18 a.m.