tests/testthat/test-hashTable.R

context("Check hashtable conversion")

test_that("Data types are retained", {
  ref = list(logical = FALSE, integer = 1L, numeric = 2.0, character = "3")
  res = ref %>% 
    (RBioFormats:::.listToHashtable) %>%
    (RBioFormats:::.hashtableToList)
  expect_identical(res[match(res, ref)], ref)
})
aoles/RBioFormats documentation built on May 3, 2024, 7:46 a.m.