summaryrefslogtreecommitdiff
path: root/source4/pidl
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2005-12-25 14:59:39 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:47:43 -0500
commitd3ced46329fe5caa590d2f0b132763d7d1825ffd (patch)
tree900ef72d56feda55c8c4dbb874138c7ade617654 /source4/pidl
parenta4fe56c06a95bf5278a4a0efdd976febc2b9866b (diff)
downloadsamba-d3ced46329fe5caa590d2f0b132763d7d1825ffd.tar.gz
samba-d3ced46329fe5caa590d2f0b132763d7d1825ffd.tar.bz2
samba-d3ced46329fe5caa590d2f0b132763d7d1825ffd.zip
r12482: Add some more tests
(This used to be commit 516b66e0f1c65688abb936b4432039bc431b872c)
Diffstat (limited to 'source4/pidl')
-rw-r--r--source4/pidl/TODO4
-rwxr-xr-xsource4/pidl/tests/parse_idl.pl22
2 files changed, 12 insertions, 14 deletions
diff --git a/source4/pidl/TODO b/source4/pidl/TODO
index 631e4f0388..f48af8c38c 100644
--- a/source4/pidl/TODO
+++ b/source4/pidl/TODO
@@ -1,5 +1,3 @@
-- allow more then one identifier for types (unsigned char, struct foo)
-
- true multiple dimension array / strings in arrays support
- compatibility mode for generating MIDL-readable data:
@@ -15,5 +13,3 @@
- replace subcontext() with represent_as()
- --explain-ndr option that dumps out parse tree ?
-
-- fix test suite
diff --git a/source4/pidl/tests/parse_idl.pl b/source4/pidl/tests/parse_idl.pl
index 2236c6d0b5..8114cd9992 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 => 46;
+use Test::More tests => 51;
use FindBin qw($RealBin);
use lib "$RealBin/../lib";
use Parse::Pidl::IDL;
@@ -29,6 +29,7 @@ sub testfail($$)
ok ((not defined $pidl), $name);
}
+testfail "unknowntag", "bla test {};";
testok "test1", "interface test { void Test(); }; ";
testok "voidtest", "interface test { int Testx(void); }; ";
testfail "voidtest", "interface test { Test(); }; ";
@@ -69,12 +70,13 @@ 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; }; };"
-};
+testok "unsigned", "interface test { struct x { unsigned short y; }; };";
+testok "signed", "interface test { struct x { signed short y; }; };";
+testok "declarg", "interface test { void test(struct { int x; } a); };";
+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; }; };";
+testok "emptystructdecl", "interface test { struct x; };";
+testok "emptyenumdecl", "interface test { enum x; };";
+testok "emptytdstructdecl", "interface test { typedef struct x y; };";