tests/testthat/test_3_cast.R

#
# test_that("Cast hdtypes",{
#
#   # # All possible casts: from -> to
#   # cs <- castable_hdtypes()
#   # expect_true(all(c(cs$from, cs$to) %in% available_hdTypes()))
#   # expect_equal(19,nrow(cs))
#   #
#   # ctype <- "Cat"
#   # expect_equal(castable_ctype("Cat"), c("Uid","Seq","Txt","Bin"))
#   # hdtypes <- availablehdtypes()
#   #
#   # # All possible casts for given hdtypes
#   # hdtypes <- c("Cat","Num","Pct")
#   # castables <- castable_list(hdtypes)
#   #
#   # hdtypes <- c("Cat","Num")
#   # castables <- castable_list(hdtypes)
#   #
#   # randomCtype <- sample(castables[[1]],1)
#   # randomCtype
#   # # Test Castables for Cat
#   # nr <- cs %>% filter(from == hdtypes[1], to == randomCtype) %>% nrow()
#   # if(hdtypes[1] != randomCtype){
#   #   expect_equal(1,nr)
#   # }
#
#
#
#
# })
datasketch/homodatum documentation built on May 1, 2023, 12:17 a.m.