Added a run test for vector types. Tests creation of a std::vector
from and R vector and transparent conversion of the result.
This commit is contained in:
parent
5c2cd32795
commit
351e21bd4a
1 changed files with 15 additions and 0 deletions
15
Examples/test-suite/r/li_std_vector_runme.R
Normal file
15
Examples/test-suite/r/li_std_vector_runme.R
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
clargs <- commandArgs(trailing=TRUE)
|
||||
source(file.path(clargs[1], "unittest.R"))
|
||||
|
||||
dyn.load(paste("li_std_vector", .Platform$dynlib.ext, sep=""))
|
||||
source("li_std_vector.R")
|
||||
cacheMetaData(1)
|
||||
|
||||
testvec <- c(1, 2, 3)
|
||||
|
||||
unittest(half(testvec), testvec/2)
|
||||
unittest(average(testvec), mean(testvec))
|
||||
q(save="no")
|
||||
|
||||
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue