summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2008-01-16 15:07:00 +0100
committerJelmer Vernooij <jelmer@samba.org>2008-01-16 15:08:00 +0100
commit3e53ad6f4a5767fd1a26a35a0060b03a6e77161c (patch)
treeea34153df3bbf85ea6208c03611745f4e1cfffff
parentaf163d258cfeee2a908e297256570a2bfcc8b651 (diff)
downloadsamba-3e53ad6f4a5767fd1a26a35a0060b03a6e77161c.tar.gz
samba-3e53ad6f4a5767fd1a26a35a0060b03a6e77161c.tar.bz2
samba-3e53ad6f4a5767fd1a26a35a0060b03a6e77161c.zip
pidl: Add simple test for ServerNDR.
(This used to be commit 5b2ea43ed8613ac10ebe7feda0cf070c8079137a)
-rw-r--r--source4/pidl/lib/Parse/Pidl/Samba3/ServerNDR.pm4
-rw-r--r--source4/pidl/tests/samba3-srv.pl10
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));