Make examples cross platform
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@10091 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
a313ca2c43
commit
6e9058cbeb
9 changed files with 31 additions and 31 deletions
|
|
@ -1,6 +1,6 @@
|
|||
source('unittest.R')
|
||||
dyn.load('copy_struct_wrap.so')
|
||||
source('copy_struct_wrap.R')
|
||||
source("unittest.R")
|
||||
dyn.load(paste("copy_struct_wrap", .Platform$dynlib.ext, sep=""))
|
||||
source("copy_struct_wrap.R")
|
||||
cacheMetaData(1)
|
||||
|
||||
a <- getA()
|
||||
|
|
@ -51,7 +51,7 @@ foo <- copyToC(la, other)
|
|||
aa = A()
|
||||
aa$i = 201
|
||||
aa$d = pi
|
||||
aa$str = 'foo'
|
||||
aa$str = "foo"
|
||||
copyToR(aa)
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
# This file illustrates the proxy class C++ interface generated
|
||||
# by SWIG.
|
||||
|
||||
dyn.load('double_delete_wrap.so')
|
||||
source('double_delete_wrap.R')
|
||||
dyn.load(paste("double_delete_wrap", .Platform$dynlib.ext, sep=""))
|
||||
source("double_delete_wrap.R")
|
||||
cacheMetaData(1)
|
||||
|
||||
# ----- Object creation -----
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
source('unittest.R')
|
||||
dyn.load('funcptr_wrap.so')
|
||||
source('funcptr_wrap.R')
|
||||
source("unittest.R")
|
||||
dyn.load(paste("funcptr_wrap", .Platform$dynlib.ext, sep=""))
|
||||
source("funcptr_wrap.R")
|
||||
cacheMetaData(1)
|
||||
unittest(do_op(1, 3, add), 4)
|
||||
unittest(do_op(2, 3, mul), 6)
|
||||
unittest(do_op(2, 3, funcvar()), 5)
|
||||
unittest(do_op(2, 3, funcvar()), 5)
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
source('unittest.R')
|
||||
dyn.load('ignore_parameter_wrap.so')
|
||||
source('ignore_parameter_wrap.R')
|
||||
source("unittest.R")
|
||||
dyn.load(paste("ignore_parameter_wrap", .Platform$dynlib.ext, sep=""))
|
||||
source("ignore_parameter_wrap.R")
|
||||
cacheMetaData(1)
|
||||
|
||||
unittest(jaguar(1, 1.0), "hello")
|
||||
q(save='no')
|
||||
q(save="no")
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
source('unittest.R')
|
||||
dyn.load('legacy_wrap.so')
|
||||
source('legacy_wrap.R')
|
||||
source("unittest.R")
|
||||
dyn.load(paste("legacy_wrap", .Platform$dynlib.ext, sep=""))
|
||||
source("legacy_wrap.R")
|
||||
cacheMetaData(1)
|
||||
|
||||
obj <- getObject(1,3)
|
||||
|
|
@ -22,7 +22,7 @@ unittest(getLong(), -321313)
|
|||
unittest(getUnsignedLong(), 23123)
|
||||
unittest(getChar(), "A")
|
||||
|
||||
q(save='no')
|
||||
q(save="no")
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
source('unittest.R')
|
||||
dyn.load('simple_array_wrap.so')
|
||||
source('simple_array_wrap.R')
|
||||
source("unittest.R")
|
||||
dyn.load(paste("simple_array_wrap", .Platform$dynlib.ext, sep=""))
|
||||
source("simple_array_wrap.R")
|
||||
cacheMetaData(1)
|
||||
initArray()
|
||||
|
||||
q(save='no')
|
||||
q(save="no")
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1,12 +1,12 @@
|
|||
source('unittest.R')
|
||||
dyn.load('unions_wrap.so')
|
||||
source('unions_wrap.R')
|
||||
source("unittest.R")
|
||||
dyn.load(paste("unions_wrap", .Platform$dynlib.ext, sep=""))
|
||||
source("unions_wrap.R")
|
||||
cacheMetaData(1)
|
||||
|
||||
ss <- SmallStruct()
|
||||
|
||||
bstruct <- BigStruct()
|
||||
|
||||
q(save='no')
|
||||
q(save="no")
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue