tests/testthat/test_dict2.R

context("dict2")

test_that("dict2 of list of two elements",{

  # variables
  a = "aval"
  aval = "AVAL"

  # set up of dict
  namedList <- dict2( c(a , aval), c( a, aval ) )

  # expectation
  expectedResult <-
    setNames(list("AVAL","AVAL"), nm = c("aval", "aval"))

  expect_identical(namedList,expectedResult)

})
andreamelloncelli/dict documentation built on May 12, 2019, 2:42 a.m.