Duplicate tests that are run twice as both C and C++ tests to fix parallel make: li_cpointer

This commit is contained in:
William S Fulton 2016-02-21 15:08:24 +00:00
parent 819bd9c97e
commit a00b4f4463
6 changed files with 55 additions and 1 deletions

View File

@ -266,7 +266,7 @@ CPP_TEST_CASES += \
li_boost_shared_ptr_attribute \
li_carrays_cpp \
li_cdata_cpp \
li_cpointer \
li_cpointer_cpp \
li_std_auto_ptr \
li_stdint \
li_swigtype_inout \

View File

@ -0,0 +1,14 @@
package main
import . "./li_cpointer_cpp"
func main() {
p := New_intp()
Intp_assign(p, 3)
if Intp_value(p) != 3 {
panic(0)
}
Delete_intp(p)
}

View File

@ -0,0 +1,10 @@
%module li_cpointer_cpp
%warnfilter(SWIGWARN_RUBY_WRONG_NAME) doublep; /* Ruby, wrong class name */
%include "cpointer.i"
%pointer_functions(int,intp);
%pointer_class(double,doublep);
%pointer_cast(int, unsigned int, int_to_uint);

View File

@ -0,0 +1,12 @@
li_cpointer_cpp
p = new_intp();
intp_assign(p,3);
if (intp_value(p) != 3)
error
endif
delete_intp(p);

View File

@ -0,0 +1,10 @@
from li_cpointer_cpp import *
p = new_intp()
intp_assign(p, 3)
if intp_value(p) != 3:
raise RuntimeError
delete_intp(p)

View File

@ -0,0 +1,8 @@
exec("swigtest.start", -1);
p = new_intp();
intp_assign(p, 3);
checkequal(intp_value(p), 3, "intp_value(p)");
delete_intp(p);
exec("swigtest.quit", -1);