summaryrefslogtreecommitdiff
path: root/source4/pidl/tests/header.pl
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2007-02-28 13:25:53 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:49:00 -0500
commit5ba8169109253c96f71e0e039b1c0b7a1056eab0 (patch)
tree575fe0e0904e7596a5d1d02691fcdc733a28cd87 /source4/pidl/tests/header.pl
parentc2003743256bc0312c5360821d501591039dafcd (diff)
downloadsamba-5ba8169109253c96f71e0e039b1c0b7a1056eab0.tar.gz
samba-5ba8169109253c96f71e0e039b1c0b7a1056eab0.tar.bz2
samba-5ba8169109253c96f71e0e039b1c0b7a1056eab0.zip
r21584: Support for tagged types has landed!
It's now possible to use "struct foo" without a typedef in IDL files. echo_info4 is the first type that's been converted. (This used to be commit 3ac68e858df9b53cf5e0a84741916214a53b3121)
Diffstat (limited to 'source4/pidl/tests/header.pl')
-rwxr-xr-xsource4/pidl/tests/header.pl8
1 files changed, 7 insertions, 1 deletions
diff --git a/source4/pidl/tests/header.pl b/source4/pidl/tests/header.pl
index 3dae33ae6c..7092eb0d14 100755
--- a/source4/pidl/tests/header.pl
+++ b/source4/pidl/tests/header.pl
@@ -4,7 +4,7 @@
use strict;
use warnings;
-use Test::More tests => 10;
+use Test::More tests => 12;
use FindBin qw($RealBin);
use lib "$RealBin";
use Util;
@@ -36,3 +36,9 @@ like(parse_idl("interface x { void foo ([in,out] uint32 x); };"),
like(parse_idl("interface x { void foo (uint32 x); };"), qr/struct foo.*{.*struct\s+{\s+uint32_t x;\s+} in;\s+struct\s+{\s+uint32_t x;\s+} out;.*};/sm, "fn with no props implies in,out");
like(parse_idl("interface p { struct x { int y; }; };"),
qr/struct x.*{.*int32_t y;.*}.*;/sm, "interface member generated properly");
+
+like(parse_idl("interface p { struct x { struct y z; }; };"),
+ qr/struct x.*{.*struct y z;.*}.*;/sm, "tagged type struct member");
+
+like(parse_idl("interface p { struct x { union y z; }; };"),
+ qr/struct x.*{.*union y z;.*}.*;/sm, "tagged type union member");