'EXE_FILES' => [ 'pidl' ],
'PMLIBDIRS' => [ 'Parse' ],
'C' => [],
+ 'test' => { 'TESTS' => 'tests/*.pl' }
);
sub MY::postamble {
package Parse::Pidl::Test;
use strict;
-use pidl::util;
+use Parse::Pidl::Util;
use Getopt::Long;
my $cc = $ENV{CC};
{
my $settings = {
OutputDir => ".",
- 'IDL-Compiler' => "./build/pidl/pidl.pl"
+ 'IDL-Compiler' => "./pidl"
};
my %opts = ();
# (C) 2005 Jelmer Vernooij. Published under the GNU GPL
use strict;
-use FindBin qw($RealBin);
-use lib "$RealBin/../..";
-use pidl::test;
+use Parse::Pidl::Test;
-my %settings = Test::GetSettings(@ARGV);
+my %settings = Parse::Pidl::Test::GetSettings(@ARGV);
$settings{'IDL-Arguments'} = ['--quiet', '--parse', '--parser=ndr_test.c', '--header=ndr_test.h'];
$settings{'IncludeFiles'} = ['ndr_test.h'];
$settings{'ExtraFiles'} = ['ndr_test.c'];
-Test::test_idl('align-uint8-uint16', \%settings,
+Parse::Pidl::Test::test_idl('align-uint8-uint16', \%settings,
'
typedef [public] struct {
uint8 x;
return 2;
');
-Test::test_idl('align-uint8-uint32', \%settings,
+Parse::Pidl::Test::test_idl('align-uint8-uint32', \%settings,
'
typedef [public] struct {
uint8 x;
');
-Test::test_idl('align-uint8-hyper', \%settings,
+Parse::Pidl::Test::test_idl('align-uint8-hyper', \%settings,
'
typedef [public] struct {
uint8 x;
return 2;
');
-Test::test_idl('noalignflag-uint8-uint16', \%settings,
+Parse::Pidl::Test::test_idl('noalignflag-uint8-uint16', \%settings,
'
typedef [public] struct {
uint8 x;
return 2;
');
-Test::test_idl('align-blob-align2', \%settings,
+Parse::Pidl::Test::test_idl('align-blob-align2', \%settings,
'
typedef [public] struct {
uint8 x;
# (C) 2005 Jelmer Vernooij. Published under the GNU GPL
use strict;
-use FindBin qw($RealBin);
-use lib "$RealBin/../..";
-use pidl::test;
+use Parse::Pidl::Test;
-my %settings = Test::GetSettings(@ARGV);
+my %settings = Parse::Pidl::Test::GetSettings(@ARGV);
$settings{'IDL-Arguments'} = ['--quiet', '--parse', '--parser=ndr_test.c', '--header=ndr_test.h'];
$settings{'IncludeFiles'} = ['ndr_test.h'];
$settings{'ExtraFiles'} = ['ndr_test.c'];
# Check that an outgoing scalar pointer is allocated correctly
-Test::test_idl("alloc-scalar", \%settings,
+Parse::Pidl::Test::test_idl("alloc-scalar", \%settings,
'
typedef struct {
uint8 *x;
);
# Check that an outgoing buffer pointer is allocated correctly
-Test::test_idl("alloc-buffer", \%settings,
+Parse::Pidl::Test::test_idl("alloc-buffer", \%settings,
'
typedef struct {
uint8 data;
);
# Check that ref pointers aren't allocated by default
-Test::test_idl("ref-noalloc-null", \%settings,
+Parse::Pidl::Test::test_idl("ref-noalloc-null", \%settings,
'
[public] void TestAlloc([in,ref] uint8 *t);
','
);
# Check that ref pointers aren't allocated by default
-Test::test_idl("ref-noalloc", \%settings,
+Parse::Pidl::Test::test_idl("ref-noalloc", \%settings,
'
[public] void TestAlloc([in,ref] uint8 *t);
','
);
# Check that an outgoing ref pointer is allocated correctly
-Test::test_idl("ref-alloc", \%settings,
+Parse::Pidl::Test::test_idl("ref-alloc", \%settings,
'
[public] void TestAlloc([in,ref] uint8 *t);
','
# Published under the GNU General Public License
use strict;
-use FindBin qw($RealBin);
-use lib "$RealBin/../..";
-use pidl::test;
+use Parse::Pidl::Test;
-my %settings = Test::GetSettings(@ARGV);
+my %settings = Parse::Pidl::Test::GetSettings(@ARGV);
$settings{'IDL-Arguments'} = ['--quiet', '--parse', '--parser=ndr_test.c', '--header=ndr_test.h'];
$settings{'IncludeFiles'} = ['ndr_test.h'];
$settings{'ExtraFiles'} = ['ndr_test.c'];
-Test::test_idl(
+Parse::Pidl::Test::test_idl(
# Name
'Fixed-Array',
# Published under the GNU General Public License.
use strict;
-use FindBin qw($RealBin);
-use lib "$RealBin/../..";
-use pidl::test;
+use Parse::Pidl::Test;
-my %settings = Test::GetSettings(@ARGV);
+my %settings = Parse::Pidl::Test::GetSettings(@ARGV);
$settings{'IDL-Arguments'} = ['--quiet', '--parse', '--parser=ndr_test.c', '--header=ndr_test.h'];
$settings{'IncludeFiles'} = ['ndr_test.h'];
$settings{'ExtraFiles'} = ['ndr_test.c'];
-Test::test_idl("noptr-push", \%settings,
+Parse::Pidl::Test::test_idl("noptr-push", \%settings,
' typedef struct {
uint16 x;
} xstruct;
}
');
-Test::test_idl("ptr-embedded-push", \%settings,
+Parse::Pidl::Test::test_idl("ptr-embedded-push", \%settings,
' typedef struct {
uint16 *x;
} xstruct;
return 4;
');
-Test::test_idl("ptr-embedded-push-null", \%settings,
+Parse::Pidl::Test::test_idl("ptr-embedded-push-null", \%settings,
' typedef struct {
uint16 *x;
} xstruct;
return 3;
');
-Test::test_idl("refptr-embedded-push", \%settings,
+Parse::Pidl::Test::test_idl("refptr-embedded-push", \%settings,
'
typedef struct {
[ref] uint16 *x;
return 4;
');
-Test::test_idl("refptr-embedded-push-null", \%settings,
+Parse::Pidl::Test::test_idl("refptr-embedded-push-null", \%settings,
'
typedef struct {
[ref] uint16 *x;
/* Windows gives [client runtime error 0x6f4] */
');
-Test::test_idl("ptr-top-push", \%settings,
+Parse::Pidl::Test::test_idl("ptr-top-push", \%settings,
'
typedef struct {
uint16 x;
return 3;
');
-Test::test_idl("ptr-top-push-null", \%settings,
+Parse::Pidl::Test::test_idl("ptr-top-push-null", \%settings,
'
typedef struct {
uint16 x;
');
-Test::test_idl("refptr-top-push", \%settings,
+Parse::Pidl::Test::test_idl("refptr-top-push", \%settings,
'
typedef struct {
uint16 x;
return 3;
');
-Test::test_idl("refptr-top-push-null", \%settings,
+Parse::Pidl::Test::test_idl("refptr-top-push-null", \%settings,
'
typedef struct {
uint16 x;
');
-Test::test_idl("uniqueptr-top-push", \%settings,
+Parse::Pidl::Test::test_idl("uniqueptr-top-push", \%settings,
' typedef struct {
uint16 x;
} xstruct;
return 4;
');
-Test::test_idl("uniqueptr-top-push-null", \%settings,
+Parse::Pidl::Test::test_idl("uniqueptr-top-push-null", \%settings,
' typedef struct {
uint16 x;
} xstruct;
');
-Test::test_idl("ptr-top-out-pull", \%settings,
+Parse::Pidl::Test::test_idl("ptr-top-out-pull", \%settings,
'
typedef struct {
uint16 x;
return 3;
');
-Test::test_idl("ptr-top-out-pull-null", \%settings,
+Parse::Pidl::Test::test_idl("ptr-top-out-pull-null", \%settings,
'
typedef struct {
uint16 x;
');
-Test::test_idl("refptr-top-out-pull", \%settings,
+Parse::Pidl::Test::test_idl("refptr-top-out-pull", \%settings,
'
typedef struct {
uint16 x;
return 3;
');
-Test::test_idl("refptr-top-out-pull-null", \%settings,
+Parse::Pidl::Test::test_idl("refptr-top-out-pull-null", \%settings,
'
typedef struct {
uint16 x;
');
-Test::test_idl("ptr-top-push-double", \%settings,
+Parse::Pidl::Test::test_idl("ptr-top-push-double", \%settings,
'
[public] void echo_TestRef([in] uint16 **foo);
',
return 4;
');
-Test::test_idl("ptr-top-push-double-sndnull", \%settings,
+Parse::Pidl::Test::test_idl("ptr-top-push-double-sndnull", \%settings,
'
[public] void echo_TestRef([in] uint16 **foo);
',
return 3;
');
-Test::test_idl("ptr-top-push-double-fstnull", \%settings,
+Parse::Pidl::Test::test_idl("ptr-top-push-double-fstnull", \%settings,
'
[public] void echo_TestRef([in] uint16 **foo);
',
');
-Test::test_idl("refptr-top-push-double", \%settings,
+Parse::Pidl::Test::test_idl("refptr-top-push-double", \%settings,
'
[public] void echo_TestRef([in,ref] uint16 **foo);
',
return 4;
');
-Test::test_idl("refptr-top-push-double-sndnull", \%settings,
+Parse::Pidl::Test::test_idl("refptr-top-push-double-sndnull", \%settings,
'
[public] void echo_TestRef([in,ref] uint16 **foo);
',
return 3;
');
-Test::test_idl("refptr-top-push-double-fstnull", \%settings,
+Parse::Pidl::Test::test_idl("refptr-top-push-double-fstnull", \%settings,
'
[public] void echo_TestRef([in,ref] uint16 **foo);
',
');
-Test::test_idl("ignore-ptr", \%settings,
+Parse::Pidl::Test::test_idl("ignore-ptr", \%settings,
'
[public] void echo_TestRef([in,ignore] uint16 *foo, [in] uint16 *bar);
',
# Published under the GNU General Public License
use strict;
-use FindBin qw($RealBin);
-use lib "$RealBin/../..";
-use pidl::test;
+use Parse::Pidl::Test;
-my %settings = Test::GetSettings(@ARGV);
+my %settings = Parse::Pidl::Test::GetSettings(@ARGV);
$settings{'IDL-Arguments'} = ['--quiet', '--parse', '--parser=ndr_test.c', '--header=ndr_test.h'];
$settings{'IncludeFiles'} = ['ndr_test.h'];
$settings{'ExtraFiles'} = ['ndr_test.c'];
-Test::test_idl(
+Parse::Pidl::Test::test_idl(
# Name
'UInt8',
# Published under the GNU General Public License
use strict;
-use FindBin qw($RealBin);
-use lib "$RealBin/../..";
-use pidl::test;
+use Parse::Pidl::Test;
-my %settings = Test::GetSettings(@ARGV);
+my %settings = Parse::Pidl::Test::GetSettings(@ARGV);
$settings{'IDL-Arguments'} = ['--quiet', '--parse', '--parser=ndr_test.c', '--header=ndr_test.h'];
$settings{'IncludeFiles'} = ['ndr_test.h'];
$settings{'ExtraFiles'} = ['ndr_test.c'];
-Test::test_idl("string-pull-empty", \%settings,
+Parse::Pidl::Test::test_idl("string-pull-empty", \%settings,
' [public] void TestString([in,flag(STR_ASCII|LIBNDR_FLAG_STR_SIZE4)] string data);',
'
uint8_t data[] = { 0x00, 0x00, 0x00, 0x00 };
return 3;
');
-Test::test_idl("string-ascii-pull", \%settings,
+Parse::Pidl::Test::test_idl("string-ascii-pull", \%settings,
'
[public] void TestString([in,flag(STR_ASCII|LIBNDR_FLAG_STR_SIZE4)] string data);
',