Polymorphism in R wrappers fixed for C++ structs
This commit is contained in:
parent
cfd2557cda
commit
1d73341aa4
10 changed files with 68 additions and 8 deletions
29
Examples/test-suite/r/typedef_inherit_runme.R
Normal file
29
Examples/test-suite/r/typedef_inherit_runme.R
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
clargs <- commandArgs(trailing=TRUE)
|
||||
source(file.path(clargs[1], "unittest.R"))
|
||||
|
||||
dyn.load(paste("typedef_inherit", .Platform$dynlib.ext, sep=""))
|
||||
source("typedef_inherit.R")
|
||||
cacheMetaData(1)
|
||||
|
||||
|
||||
a <- Foo()
|
||||
b <- Bar()
|
||||
|
||||
x <- do_blah(a)
|
||||
unittest(x, "Foo::blah")
|
||||
|
||||
x <- do_blah(b)
|
||||
unittest(x, "Bar::blah")
|
||||
|
||||
c <- Spam()
|
||||
d <- Grok()
|
||||
|
||||
x <- do_blah2(c)
|
||||
unittest(x, "Spam::blah")
|
||||
|
||||
x <- do_blah2(d)
|
||||
unittest(x, "Grok::blah")
|
||||
|
||||
unittest(d$far(), "Spam::far")
|
||||
|
||||
q(save="no")
|
||||
Loading…
Add table
Add a link
Reference in a new issue