summaryrefslogtreecommitdiff
path: root/source4/pidl/tests/ndr_tagtype.pl
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2008-09-17 17:12:27 +0200
committerJelmer Vernooij <jelmer@samba.org>2008-09-17 17:12:27 +0200
commit79190992b3820cd028c961c48bdea9b35baf13c9 (patch)
tree0de851669d98f04e947d20349d96723462cd1eb0 /source4/pidl/tests/ndr_tagtype.pl
parent3b5330e9094ecf0be94d3dbea744de140ec55e19 (diff)
downloadsamba-79190992b3820cd028c961c48bdea9b35baf13c9.tar.gz
samba-79190992b3820cd028c961c48bdea9b35baf13c9.tar.bz2
samba-79190992b3820cd028c961c48bdea9b35baf13c9.zip
Move pidl to top-level directory.
Diffstat (limited to 'source4/pidl/tests/ndr_tagtype.pl')
-rwxr-xr-xsource4/pidl/tests/ndr_tagtype.pl66
1 files changed, 0 insertions, 66 deletions
diff --git a/source4/pidl/tests/ndr_tagtype.pl b/source4/pidl/tests/ndr_tagtype.pl
deleted file mode 100755
index 3f9b717bfe..0000000000
--- a/source4/pidl/tests/ndr_tagtype.pl
+++ /dev/null
@@ -1,66 +0,0 @@
-#!/usr/bin/perl
-# Support for tagged types
-# (C) 2005 Jelmer Vernooij. Published under the GNU GPL
-use strict;
-
-use Test::More tests => 3 * 8;
-use FindBin qw($RealBin);
-use lib "$RealBin";
-use Util qw(test_samba4_ndr);
-
-test_samba4_ndr('struct-notypedef', '[public] struct bla { uint8 x; }; ',
-'
- struct ndr_push *ndr = ndr_push_init_ctx(NULL, NULL);
- struct bla r;
- uint8_t expected[] = { 0x0D };
- DATA_BLOB expected_blob = { expected, 1 };
- DATA_BLOB result_blob;
- r.x = 13;
-
- if (!NDR_ERR_CODE_IS_SUCCESS(ndr_push_STRUCT_bla(ndr, NDR_SCALARS|NDR_BUFFERS, &r)))
- return 1;
-
- result_blob = ndr_push_blob(ndr);
-
- if (data_blob_cmp(&result_blob, &expected_blob) != 0)
- return 2;
-');
-
-test_samba4_ndr('struct-notypedef-used', '[public] struct bla { uint8 x; };
- [public] void myfn([in] struct bla r); ',
-'
- struct ndr_push *ndr = ndr_push_init_ctx(NULL, NULL);
- struct myfn fn;
- uint8_t expected[] = { 0x0D };
- DATA_BLOB expected_blob = { expected, 1 };
- DATA_BLOB result_blob;
- fn.in.r.x = 13;
-
- if (!NDR_ERR_CODE_IS_SUCCESS(ndr_push_myfn(ndr, NDR_IN, &fn)))
- return 1;
-
- result_blob = ndr_push_blob(ndr);
-
- if (data_blob_cmp(&result_blob, &expected_blob) != 0)
- return 2;
-');
-
-
-test_samba4_ndr('struct-notypedef-embedded', 'struct bla { uint8 x; };
- [public] struct myst { struct bla r; }; ',
-'
- struct ndr_push *ndr = ndr_push_init_ctx(NULL, NULL);
- struct myst st;
- uint8_t expected[] = { 0x0D };
- DATA_BLOB expected_blob = { expected, 1 };
- DATA_BLOB result_blob;
- st.r.x = 13;
-
- if (!NDR_ERR_CODE_IS_SUCCESS(ndr_push_STRUCT_myst(ndr, NDR_IN, &st)))
- return 1;
-
- result_blob = ndr_push_blob(ndr);
-
- if (data_blob_cmp(&result_blob, &expected_blob) != 0)
- return 2;
-');