auth/ntlmssp: Remove gensec_security element from gensec_ntlmssp_state
[Samba.git] / pidl / tests / tdr.pl
blobd6cd7a03d4c1804e51160dd77592939e8e7b65e8
1 #!/usr/bin/perl
2 # (C) 2007 Jelmer Vernooij <jelmer@samba.org>
3 # Published under the GNU General Public License
4 use strict;
5 use warnings;
7 use Test::More tests => 6;
8 use FindBin qw($RealBin);
9 use lib "$RealBin";
10 use Util;
11 use Parse::Pidl::Samba4::TDR qw(ParserType);
13 my $tdr = new Parse::Pidl::Samba4::TDR();
15 $tdr->ParserType({TYPE => "STRUCT", NAME => "foo", PROPERTIES => {public => 1}}, "pull");
16 is($tdr->{ret}, "NTSTATUS tdr_pull_foo (struct tdr_pull *tdr, TALLOC_CTX *mem_ctx, struct foo *v)
18 return NT_STATUS_OK;
21 ");
22 is($tdr->{ret_hdr}, "NTSTATUS tdr_pull_foo (struct tdr_pull *tdr, TALLOC_CTX *mem_ctx, struct foo *v);\n");
25 $tdr = new Parse::Pidl::Samba4::TDR();
26 $tdr->ParserType({TYPE => "UNION", NAME => "bar", PROPERTIES => {public => 1}}, "pull");
27 is($tdr->{ret}, "NTSTATUS tdr_pull_bar(struct tdr_pull *tdr, TALLOC_CTX *mem_ctx, int level, union bar *v)
29 switch (level) {
31 return NT_STATUS_OK;
35 ");
36 is($tdr->{ret_hdr}, "NTSTATUS tdr_pull_bar(struct tdr_pull *tdr, TALLOC_CTX *mem_ctx, int level, union bar *v);\n");
38 $tdr = new Parse::Pidl::Samba4::TDR();
39 $tdr->ParserType({TYPE => "UNION", NAME => "bar", PROPERTIES => {}}, "pull");
40 is($tdr->{ret}, "static NTSTATUS tdr_pull_bar(struct tdr_pull *tdr, TALLOC_CTX *mem_ctx, int level, union bar *v)
42 switch (level) {
44 return NT_STATUS_OK;
48 ");
49 is($tdr->{ret_hdr}, "");