diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2007-02-18 18:44:56 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 14:48:33 -0500 |
commit | 0515f728e64dde0c197aee6180dce79ad281d5f8 (patch) | |
tree | a90230e7c7bf5b93a8922852163291f729e39f39 /source4/pidl/tests | |
parent | d425796fff07b8bc7b9eb49bc8db71aff9c1161f (diff) | |
download | samba-0515f728e64dde0c197aee6180dce79ad281d5f8.tar.gz samba-0515f728e64dde0c197aee6180dce79ad281d5f8.tar.bz2 samba-0515f728e64dde0c197aee6180dce79ad281d5f8.zip |
r21433: Get rid of the COM support code - it's not used and unmaintained. We can
always bring it back if we need to. This code was getting in the way while
refactoring.
Add some tests for TDR.
Get rid of typedef in lib/registry/tdr_regf.idl and fix the
TDR code to be able to deal with it.
(This used to be commit 1ad0f99a439f0d52a735b391bf9900d50171aca5)
Diffstat (limited to 'source4/pidl/tests')
-rwxr-xr-x | source4/pidl/tests/tdr.pl | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/source4/pidl/tests/tdr.pl b/source4/pidl/tests/tdr.pl new file mode 100755 index 0000000000..35e54f53fc --- /dev/null +++ b/source4/pidl/tests/tdr.pl @@ -0,0 +1,48 @@ +#!/usr/bin/perl +# (C) 2007 Jelmer Vernooij <jelmer@samba.org> +# Published under the GNU General Public License +use strict; +use warnings; + +use Test::More tests => 6; +use FindBin qw($RealBin); +use lib "$RealBin"; +use Util; +use Parse::Pidl::Samba4::TDR qw($ret $ret_hdr 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) +{ + return NT_STATUS_OK; +} + +"); +is($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) +{ + switch (level) { + } + return NT_STATUS_OK; + +} + +"); +is($ret_hdr, "NTSTATUS tdr_pull_bar(struct tdr_pull *tdr, TALLOC_CTX *mem_ctx, int level, union bar *v);\n"); + +$ret = ""; $ret_hdr = ""; + +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) +{ + switch (level) { + } + return NT_STATUS_OK; + +} + +"); +is($ret_hdr, ""); |