Rev 11660: Test use of typedef /and/ struct name in
file:///home/jelmer/bzr.samba/SAMBA_4_0/
Jelmer Vernooij
jelmer at samba.org
Sun Mar 4 23:59:22 GMT 2007
At file:///home/jelmer/bzr.samba/SAMBA_4_0/
------------------------------------------------------------
revno: 11660
revision-id: jelmer at samba.org-20070304235911-wfrdmh81t8nnp0ok
parent: svn-v2:21689 at 0c0555d6-39d7-0310-84fc-f1cc0bd64818-branches%2fSAMBA_4_0
committer: Jelmer Vernooij <jelmer at samba.org>
branch nick: SAMBA_4_0
timestamp: Mon 2007-03-05 00:59:11 +0100
message:
Test use of typedef /and/ struct name
modified:
source/pidl/tests/header.pl svn-v2:21253 at 0c0555d6-39d7-0310-84fc-f1cc0bd64818-branches%2fSAMBA_4_0-source%2fpidl%2ftests%2fheader.pl
source/pidl/tests/parse_idl.pl svn-v2:12464 at 0c0555d6-39d7-0310-84fc-f1cc0bd64818-branches%2fSAMBA_4_0-source%2fpidl%2ftests%2fparse_idl.pl
=== modified file 'source/pidl/tests/header.pl'
--- a/source/pidl/tests/header.pl 2007-03-04 14:16:52 +0000
+++ b/source/pidl/tests/header.pl 2007-03-04 23:59:11 +0000
@@ -4,7 +4,7 @@
use strict;
use warnings;
-use Test::More tests => 14;
+use Test::More tests => 15;
use FindBin qw($RealBin);
use lib "$RealBin";
use Util;
@@ -48,3 +48,6 @@
like(parse_idl("interface p { struct x; };"),
qr/struct x;/sm, "struct declaration");
+
+like(parse_idl("interface p { typedef struct x { int p; } x; };"),
+ qr/struct x.*{.*int32_t p;.*};/sm, "double struct declaration");
=== modified file 'source/pidl/tests/parse_idl.pl'
--- a/source/pidl/tests/parse_idl.pl 2007-03-04 14:16:52 +0000
+++ b/source/pidl/tests/parse_idl.pl 2007-03-04 23:59:11 +0000
@@ -4,7 +4,7 @@
# Published under the GNU General Public License
use strict;
-use Test::More tests => 63 * 2 + 2;
+use Test::More tests => 64 * 2 + 2;
use FindBin qw($RealBin);
use lib "$RealBin";
use Util qw(test_errors);
@@ -108,6 +108,7 @@
testok "import-multiple", "import \"foo.idl\", \"bar.idl\";";
testok "include-multiple", "include \"foo.idl\", \"bar.idl\";";
testok "empty-struct", "interface test { struct foo { }; }";
+testok "typedef-double", "interface test { typedef struct foo { } foo; }";
my $x = Parse::Pidl::IDL::parse_string("interface foo { struct x {}; }", "<foo>");
More information about the samba-cvs
mailing list