From 1e7c04c1eb7c0b176fc0610c9a3a35bb456af769 Mon Sep 17 00:00:00 2001 From: William S Fulton Date: Sun, 21 Feb 2016 21:31:16 +0000 Subject: [PATCH] Duplicate tests that are run twice as both C and C++ tests to fix parallel make: li_cdata_carrays --- Examples/test-suite/li_cdata_carrays_cpp.i | 8 ++++++++ Examples/test-suite/perl5/Makefile.in | 2 +- .../test-suite/perl5/li_cdata_carrays_cpp_runme.pl | 14 ++++++++++++++ 3 files changed, 23 insertions(+), 1 deletion(-) create mode 100644 Examples/test-suite/li_cdata_carrays_cpp.i create mode 100644 Examples/test-suite/perl5/li_cdata_carrays_cpp_runme.pl diff --git a/Examples/test-suite/li_cdata_carrays_cpp.i b/Examples/test-suite/li_cdata_carrays_cpp.i new file mode 100644 index 000000000..9a88b8480 --- /dev/null +++ b/Examples/test-suite/li_cdata_carrays_cpp.i @@ -0,0 +1,8 @@ +%module li_cdata_carrays_cpp + +%include +%array_class(int, intArray); + +%include + +%cdata(int); diff --git a/Examples/test-suite/perl5/Makefile.in b/Examples/test-suite/perl5/Makefile.in index 3f3d8f4fc..48d5fa5d1 100644 --- a/Examples/test-suite/perl5/Makefile.in +++ b/Examples/test-suite/perl5/Makefile.in @@ -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 \ diff --git a/Examples/test-suite/perl5/li_cdata_carrays_cpp_runme.pl b/Examples/test-suite/perl5/li_cdata_carrays_cpp_runme.pl new file mode 100644 index 000000000..34b5e19b4 --- /dev/null +++ b/Examples/test-suite/perl5/li_cdata_carrays_cpp_runme.pl @@ -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");