mirror of https://github.com/swig/swig
Duplicate tests that are run twice as both C and C++ tests to fix parallel make: li_cdata_carrays
This commit is contained in:
parent
7e1d95de09
commit
1e7c04c1eb
|
@ -0,0 +1,8 @@
|
|||
%module li_cdata_carrays_cpp
|
||||
|
||||
%include <carrays.i>
|
||||
%array_class(int, intArray);
|
||||
|
||||
%include <cdata.i>
|
||||
|
||||
%cdata(int);
|
|
@ -14,7 +14,7 @@ top_builddir = @top_builddir@
|
|||
CPP_TEST_CASES += \
|
||||
primitive_types \
|
||||
li_cstring \
|
||||
li_cdata_carrays \
|
||||
li_cdata_carrays_cpp \
|
||||
li_reference \
|
||||
director_nestedmodule \
|
||||
|
||||
|
|
|
@ -0,0 +1,14 @@
|
|||
use strict;
|
||||
use warnings;
|
||||
use Test::More tests => 4;
|
||||
BEGIN { use_ok('li_cdata_carrays_cpp') }
|
||||
require_ok('li_cdata_carrays_cpp');
|
||||
|
||||
my $ia = li_cdata_carrays_cpp::intArray->new(5);
|
||||
for (0..4) {
|
||||
$ia->setitem($_, $_**2);
|
||||
}
|
||||
ok(1, "setitems");
|
||||
my $x = pack q{I5}, map $_**2, (0..4);
|
||||
my $y = li_cdata_carrays_cpp::cdata_int($ia->cast, 5);
|
||||
is($x, $y, "carrays");
|
Loading…
Reference in New Issue