diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2005-12-25 14:11:59 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:47:43 -0500 |
commit | 8e924678b205910a5147ceb948d4db86e3a9ae0c (patch) | |
tree | 6df3acace87f2e6029c59801de4f7cf83617517f /source4 | |
parent | 7717f180ca2f908e1b3258355520719991215050 (diff) | |
download | samba-8e924678b205910a5147ceb948d4db86e3a9ae0c.tar.gz samba-8e924678b205910a5147ceb948d4db86e3a9ae0c.tar.bz2 samba-8e924678b205910a5147ceb948d4db86e3a9ae0c.zip |
r12480: Extend testsuite
(This used to be commit 1fa6c3568b9653f637da92e9a66695cd89825a2f)
Diffstat (limited to 'source4')
-rwxr-xr-x | source4/pidl/tests/parse_idl.pl | 25 |
1 files changed, 24 insertions, 1 deletions
diff --git a/source4/pidl/tests/parse_idl.pl b/source4/pidl/tests/parse_idl.pl index 7fdd2ddfac..2236c6d0b5 100755 --- a/source4/pidl/tests/parse_idl.pl +++ b/source4/pidl/tests/parse_idl.pl @@ -4,7 +4,7 @@ # Published under the GNU General Public License use strict; -use Test::More tests => 26; +use Test::More tests => 46; use FindBin qw($RealBin); use lib "$RealBin/../lib"; use Parse::Pidl::IDL; @@ -44,14 +44,37 @@ testfail "empty1", "interface test { };"; testfail "empty2", ""; testok "attr1", "[uuid(\"myuuid\"),attr] interface test { int Test(int ***a); };"; testok "attr2", "interface test { [public] int Test(); };"; +testok "attr3", "[attr1] [attr2] interface test { [public] int Test(); };"; testok "multfn", "interface test { int test1(); int test2(); };"; testok "multif", "interface test { int test1(); }; interface test2 { int test2(); };"; testok "tdstruct1", "interface test { typedef struct { } foo; };"; testok "tdstruct2", "interface test { typedef struct { int a; } foo; };"; testok "tdstruct3", "interface test { typedef struct { int a; int b; } foo; };"; testfail "tdstruct4", "interface test { typedef struct { int a, int b; } foo; };"; +testok "struct1", "interface test { struct x { }; };"; +testok "struct2", "interface test { struct x { int a; }; };"; +testok "struct3", "interface test { struct x { int a; int b; }; };"; +testfail "struct4", "interface test { struct x { int a, int b; }; };"; +testfail "struct5", "interface test { struct { int a; } x; };"; testok "tdunion1", "interface test { typedef union { } a; };"; testok "tdunion2", "interface test { typedef union { int a; } a; };"; +testok "union1", "interface test { union a { }; };"; +testok "union2", "interface test { union x { int a; }; };"; +testfail "union3", "interface test { union { int a; } x; };"; testok "typedef1", "interface test { typedef int a; };"; testfail "typedef2", "interface test { typedef x; };"; testok "tdenum1", "interface test { typedef enum { A=1, B=2, C} a; };"; +testok "enum1", "interface test { enum a { A=1, B=2, C}; };"; +testfail "enum2", "interface test { enum { A=1, B=2, C} a; };"; +testok "nested1", "interface test { struct x { struct { int a; } z; }; };"; +testok "nested2", "interface test { struct x { struct y { int a; } z; }; };"; +testok "bitmap1", "interface test { bitmap x { a=1 }; };"; +TODO: { + local $TODO = "qualifiers on defined types not supported yet"; + testok "unsigned", "interface test { struct x { unsigned short y; }; };"; + testok "signed", "interface test { struct x { signed short y; }; };"; + testok "structqual", "interface test { struct x { struct y z; }; };"; + testok "unionqual", "interface test { struct x { union y z; }; };"; + testok "enumqual", "interface test { struct x { enum y z; }; };"; + testok "bitmapqual", "interface test { struct x { bitmap y z; }; };" +}; |