summaryrefslogtreecommitdiff
path: root/source4/pidl/tests
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2007-04-22 10:42:33 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:51:22 -0500
commit3b39a0df0aa941c88a872f24279584cd86558b6c (patch)
tree84db8410d6e20cf9a8bf50cfb678ca8dec45d4b4 /source4/pidl/tests
parentd511061e6ffd03d0aad887a1d18707d9f32ae5c4 (diff)
downloadsamba-3b39a0df0aa941c88a872f24279584cd86558b6c.tar.gz
samba-3b39a0df0aa941c88a872f24279584cd86558b6c.tar.bz2
samba-3b39a0df0aa941c88a872f24279584cd86558b6c.zip
r22453: Fix TDR testsuite without using our.
(This used to be commit 2c82aea0d3cb43b6d653fa7d64d490eddef26903)
Diffstat (limited to 'source4/pidl/tests')
-rwxr-xr-xsource4/pidl/tests/tdr.pl27
1 files changed, 14 insertions, 13 deletions
diff --git a/source4/pidl/tests/tdr.pl b/source4/pidl/tests/tdr.pl
index 35e54f53fc..d6cd7a03d4 100755
--- a/source4/pidl/tests/tdr.pl
+++ b/source4/pidl/tests/tdr.pl
@@ -8,21 +8,23 @@ use Test::More tests => 6;
use FindBin qw($RealBin);
use lib "$RealBin";
use Util;
-use Parse::Pidl::Samba4::TDR qw($ret $ret_hdr ParserType);
+use Parse::Pidl::Samba4::TDR qw(ParserType);
-ParserType({TYPE => "STRUCT", NAME => "foo", PROPERTIES => {public => 1}}, "pull");
-is($ret, "NTSTATUS tdr_pull_foo (struct tdr_pull *tdr, TALLOC_CTX *mem_ctx, struct foo *v)
+my $tdr = new Parse::Pidl::Samba4::TDR();
+
+$tdr->ParserType({TYPE => "STRUCT", NAME => "foo", PROPERTIES => {public => 1}}, "pull");
+is($tdr->{ret}, "NTSTATUS tdr_pull_foo (struct tdr_pull *tdr, TALLOC_CTX *mem_ctx, struct foo *v)
{
return NT_STATUS_OK;
}
");
-is($ret_hdr, "NTSTATUS tdr_pull_foo (struct tdr_pull *tdr, TALLOC_CTX *mem_ctx, struct foo *v);\n");
+is($tdr->{ret_hdr}, "NTSTATUS tdr_pull_foo (struct tdr_pull *tdr, TALLOC_CTX *mem_ctx, struct foo *v);\n");
-$ret = ""; $ret_hdr = "";
-ParserType({TYPE => "UNION", NAME => "bar", PROPERTIES => {public => 1}}, "pull");
-is($ret, "NTSTATUS tdr_pull_bar(struct tdr_pull *tdr, TALLOC_CTX *mem_ctx, int level, union bar *v)
+$tdr = new Parse::Pidl::Samba4::TDR();
+$tdr->ParserType({TYPE => "UNION", NAME => "bar", PROPERTIES => {public => 1}}, "pull");
+is($tdr->{ret}, "NTSTATUS tdr_pull_bar(struct tdr_pull *tdr, TALLOC_CTX *mem_ctx, int level, union bar *v)
{
switch (level) {
}
@@ -31,12 +33,11 @@ is($ret, "NTSTATUS tdr_pull_bar(struct tdr_pull *tdr, TALLOC_CTX *mem_ctx, int l
}
");
-is($ret_hdr, "NTSTATUS tdr_pull_bar(struct tdr_pull *tdr, TALLOC_CTX *mem_ctx, int level, union bar *v);\n");
-
-$ret = ""; $ret_hdr = "";
+is($tdr->{ret_hdr}, "NTSTATUS tdr_pull_bar(struct tdr_pull *tdr, TALLOC_CTX *mem_ctx, int level, union bar *v);\n");
-ParserType({TYPE => "UNION", NAME => "bar", PROPERTIES => {}}, "pull");
-is($ret, "static NTSTATUS tdr_pull_bar(struct tdr_pull *tdr, TALLOC_CTX *mem_ctx, int level, union bar *v)
+$tdr = new Parse::Pidl::Samba4::TDR();
+$tdr->ParserType({TYPE => "UNION", NAME => "bar", PROPERTIES => {}}, "pull");
+is($tdr->{ret}, "static NTSTATUS tdr_pull_bar(struct tdr_pull *tdr, TALLOC_CTX *mem_ctx, int level, union bar *v)
{
switch (level) {
}
@@ -45,4 +46,4 @@ is($ret, "static NTSTATUS tdr_pull_bar(struct tdr_pull *tdr, TALLOC_CTX *mem_ctx
}
");
-is($ret_hdr, "");
+is($tdr->{ret_hdr}, "");