summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2006-03-25 20:51:41 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:59:14 -0500
commita2d4079c81940b336b9b47cf23d24c66644a6076 (patch)
tree3ea09fb2d99f61f59a268db323b0aee1e5775899 /source4
parent51c08bc26bc58e649b0e684d4dfd4a46485573e5 (diff)
downloadsamba-a2d4079c81940b336b9b47cf23d24c66644a6076.tar.gz
samba-a2d4079c81940b336b9b47cf23d24c66644a6076.tar.bz2
samba-a2d4079c81940b336b9b47cf23d24c66644a6076.zip
r14727: Update pidls' TODO, add test that demonstrates the desired behaviour
(This used to be commit c2f510d38be6b4387120d7477ddd200b9bec13e5)
Diffstat (limited to 'source4')
-rw-r--r--source4/pidl/TODO7
-rwxr-xr-xsource4/pidl/tests/ndr_tagtype.pl38
2 files changed, 41 insertions, 4 deletions
diff --git a/source4/pidl/TODO b/source4/pidl/TODO
index 6203bd412f..3098a44a8f 100644
--- a/source4/pidl/TODO
+++ b/source4/pidl/TODO
@@ -11,11 +11,10 @@
- auto-alloc [ref] pointers for Samba4 during pull if they were NULL
-- replace subcontext() with represent_as()
- - NTSTATUS FROM_to_TO (const FROM *f, TO **t); /* FIXME: t needs to be allocated using talloc */
- - NTSTATUS TO_to_FROM (const TO *t, FROM **f); /* FIXME: f needs to be allocated using talloc */
- - `
+- improve represent_as()
- --explain-ndr option that dumps out parse tree ?
- seperate tables for NDR and DCE/RPC
+
+- allow data structures outside of interfaces
diff --git a/source4/pidl/tests/ndr_tagtype.pl b/source4/pidl/tests/ndr_tagtype.pl
new file mode 100755
index 0000000000..dcdbc22494
--- /dev/null
+++ b/source4/pidl/tests/ndr_tagtype.pl
@@ -0,0 +1,38 @@
+#!/usr/bin/perl
+# Support for tagged types
+# (C) 2005 Jelmer Vernooij. Published under the GNU GPL
+use strict;
+
+use Test::More tests => 1 * 8;
+use FindBin qw($RealBin);
+use lib "$RealBin/../lib";
+use lib "$RealBin";
+use Util qw(test_samba4_ndr);
+
+SKIP: {
+ skip "Tagged types without typedef are not supported yet", 8;
+
+test_samba4_ndr('struct-notypedef',
+'
+ struct bla {
+ uint8 x;
+ };
+',
+'
+ struct ndr_push *ndr = ndr_push_init();
+ struct bla r;
+ uint8_t expected[] = { 0x0D };
+ DATA_BLOB expected_blob = { expected, 1 };
+ DATA_BLOB result_blob;
+ r.x = 13;
+
+ if (NT_STATUS_IS_ERR(ndr_push_bla(ndr, NDR_SCALARS|NDR_BUFFERS, &r)))
+ return 1;
+
+ result_blob = ndr_push_blob(ndr);
+
+ if (!data_blob_equal(&result_blob, &expected_blob))
+ return 2;
+');
+
+}