diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2008-01-16 15:07:00 +0100 |
---|---|---|
committer | Jelmer Vernooij <jelmer@samba.org> | 2008-01-16 15:08:00 +0100 |
commit | 3e53ad6f4a5767fd1a26a35a0060b03a6e77161c (patch) | |
tree | ea34153df3bbf85ea6208c03611745f4e1cfffff /source4 | |
parent | af163d258cfeee2a908e297256570a2bfcc8b651 (diff) | |
download | samba-3e53ad6f4a5767fd1a26a35a0060b03a6e77161c.tar.gz samba-3e53ad6f4a5767fd1a26a35a0060b03a6e77161c.tar.bz2 samba-3e53ad6f4a5767fd1a26a35a0060b03a6e77161c.zip |
pidl: Add simple test for ServerNDR.
(This used to be commit 5b2ea43ed8613ac10ebe7feda0cf070c8079137a)
Diffstat (limited to 'source4')
-rw-r--r-- | source4/pidl/lib/Parse/Pidl/Samba3/ServerNDR.pm | 4 | ||||
-rw-r--r-- | source4/pidl/tests/samba3-srv.pl | 10 |
2 files changed, 11 insertions, 3 deletions
diff --git a/source4/pidl/lib/Parse/Pidl/Samba3/ServerNDR.pm b/source4/pidl/lib/Parse/Pidl/Samba3/ServerNDR.pm index ecc43ab896..ca9e7d15db 100644 --- a/source4/pidl/lib/Parse/Pidl/Samba3/ServerNDR.pm +++ b/source4/pidl/lib/Parse/Pidl/Samba3/ServerNDR.pm @@ -6,6 +6,10 @@ package Parse::Pidl::Samba3::ServerNDR; +use Exporter; +@ISA = qw(Exporter); +@EXPORT_OK = qw(DeclLevel); + use strict; use Parse::Pidl qw(warning fatal); use Parse::Pidl::Typelist qw(mapTypeName scalar_is_reference); diff --git a/source4/pidl/tests/samba3-srv.pl b/source4/pidl/tests/samba3-srv.pl index dc96518fd0..d1e2bc9545 100644 --- a/source4/pidl/tests/samba3-srv.pl +++ b/source4/pidl/tests/samba3-srv.pl @@ -4,11 +4,15 @@ use strict; use warnings; -use Test::More tests => 0; +use Test::More tests => 1; use FindBin qw($RealBin); use lib "$RealBin"; use Util; -use Parse::Pidl::Util qw(MyDumper); -use Parse::Pidl::Samba3::ServerNDR; +use Parse::Pidl::Util qw(MyDumper has_property); +use Parse::Pidl::Samba3::ServerNDR qw(DeclLevel); +my $l = { TYPE => "DATA", DATA_TYPE => "uint32" }; +my $e = { FILE => "foo", LINE => 0, PROPERTIES => { }, TYPE => "uint32", + LEVELS => [ $l ] }; +is("uint32_t", DeclLevel($e, 0)); |