tests/t-change.R

source(file.path("_helper", "init.R"))

# - "Construction works" -------------------------------------------------------

# invalid slot
try(new("unitizerChanges", removed = 1:3))
# invalid/ got character
try(new("unitizerChanges", failed = letters[1:2]))

# - "Output as expected" -------------------------------------------------------

my.changes <- new("unitizerChanges", failed = c(1L, 10L), new = c(1L, 
    5L), removed = c(2L, 4L), corrupted = c(3L, 8L))
show(my.changes)

# - "Length Works" -------------------------------------------------------------

length(my.changes) # 7

Try the unitizer package in your browser

Any scripts or data that you put into this service are public.

unitizer documentation built on Oct. 8, 2023, 5:06 p.m.