From b76b6a15225329941c20070d05356aba56044173 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Thu, 16 Aug 2007 13:41:48 +0000 Subject: [PATCH] r24492: Parse::Pidl::Samba4::Header::Parse() now takes an $ndr tree not the $pidl tree anymore. metze (This used to be commit 3cbbddb94c9e986d0adbe3b001146b209cd810d9) --- source4/pidl/tests/Util.pm | 8 +++++--- source4/pidl/tests/header.pl | 4 +++- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/source4/pidl/tests/Util.pm b/source4/pidl/tests/Util.pm index 897e8484408..dfd219186f0 100644 --- a/source4/pidl/tests/Util.pm +++ b/source4/pidl/tests/Util.pm @@ -48,12 +48,14 @@ sub test_samba4_ndr { my ($name,$idl,$c,$extra) = @_; my $pidl = Parse::Pidl::IDL::parse_string("interface echo { $idl }; ", "<$name>"); - ok(defined($pidl), "($name) parse idl"); - my $header = Parse::Pidl::Samba4::Header::Parse($pidl); - ok(defined($header), "($name) generate generic header"); + my $pndr = Parse::Pidl::NDR::Parse($pidl); ok(defined($pndr), "($name) generate NDR tree"); + + my $header = Parse::Pidl::Samba4::Header::Parse($pndr); + ok(defined($header), "($name) generate generic header"); + my $generator = new Parse::Pidl::Samba4::NDR::Parser(); my ($ndrheader,$ndrparser) = $generator->Parse($pndr, undef, undef); ok(defined($ndrparser), "($name) generate NDR parser"); diff --git a/source4/pidl/tests/header.pl b/source4/pidl/tests/header.pl index 331f4dd9fb5..c7a57eb0090 100755 --- a/source4/pidl/tests/header.pl +++ b/source4/pidl/tests/header.pl @@ -11,12 +11,14 @@ use Util; use Parse::Pidl::Util qw(MyDumper); use Parse::Pidl::Samba4::Header; use Parse::Pidl::IDL qw(parse_string); +use Parse::Pidl::NDR; sub parse_idl($) { my $text = shift; my $idl = Parse::Pidl::IDL::parse_string($text, "nofile"); - return Parse::Pidl::Samba4::Header::Parse($idl); + my $ndr = Parse::Pidl::NDR::Parse($idl); + return Parse::Pidl::Samba4::Header::Parse($ndr); } like(parse_idl(""), qr/\/\* header auto-generated by pidl \*\/\n/sm, "includes work");