Nothing
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
#+++ Unit tests for fCheck... functions +++
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
# Author: AMM
#require(testthat)
context('fCheckValue...')
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
test_that('fCheckValString',{
#allowed entries
expect_true( fCheckValString('a') )
expect_true( fCheckValString(NA_character_) )
expect_true( fCheckValString(NA) )
#false entries
expect_false( fCheckValString(NULL) ) #length() == 0
expect_false( fCheckValString(1) ) #is.character()
expect_false( fCheckValString('') ) #empty string, nzchar()
})
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
test_that('fCheckValNumeric',{
#allowed entries
expect_true( fCheckValNum(1) )
expect_true( fCheckValNum(NA_real_) )
expect_true( fCheckValNum(NA) )
#false entries
expect_false( fCheckValNum(NULL) ) #length() == 0
expect_false( fCheckValNum('a') ) #is.numeric()
})
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.