Add catches_strings test to test throws char * typemap
This commit is contained in:
parent
034e2358f9
commit
4a29229bab
21 changed files with 286 additions and 0 deletions
15
Examples/test-suite/r/catches_strings_runme.R
Normal file
15
Examples/test-suite/r/catches_strings_runme.R
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
clargs <- commandArgs(trailing=TRUE)
|
||||
source(file.path(clargs[1], "unittest.R"))
|
||||
|
||||
dyn.load(paste("catches_strings", .Platform$dynlib.ext, sep=""))
|
||||
source("catches_strings.R")
|
||||
cacheMetaData(1)
|
||||
|
||||
exception_thrown = FALSE
|
||||
tryCatch({
|
||||
StringsThrower_charstring()
|
||||
}, error = function(e) {
|
||||
exception_thrown <<- grepl(e$message, "charstring message", fixed=TRUE)
|
||||
}
|
||||
)
|
||||
unittest(exception_thrown, TRUE)
|
||||
Loading…
Add table
Add a link
Reference in a new issue