inst/unitTests/test_R6template.R

library(RUnit)
library(R6template)
#----------------------------------------------------------------------------------------------------
runTests <- function()
{
    test_ctor()

} # runTests
#----------------------------------------------------------------------------------------------------
test_ctor <- function()
{
    message(sprintf("--- test_ctor"))

    id <- "abc"
    rt <- R6template$new(id)
    checkTrue(all(c("R6", "R6template") %in% class(rt)))
    checkEquals(rt$getID(), id)

} # test_ctor
#----------------------------------------------------------------------------------------------------
if(!interactive())
    runTests()
paul-shannon/R6-template documentation built on Dec. 22, 2021, 6:42 a.m.