VERSION: Disable GIT_SNAPSHOT for the 4.16.0rc3 release.
[Samba.git] / pidl / tests / ndr_fullptr.pl
blob109b368ea22b37f408487b5bec5e72b2c4b2abb5
1 #!/usr/bin/perl
2 # Simple tests for unique pointers
3 # (C) 2006 Jelmer Vernooij <jelmer@samba.org>.
4 # Published under the GNU General Public License.
5 use strict;
6 use warnings;
8 use Test::More tests => 1 * 8;
9 use FindBin qw($RealBin);
10 use lib "$RealBin";
11 use Util qw(test_samba4_ndr);
13 SKIP: {
14 skip "full pointers not supported yet", 8;
16 test_samba4_ndr("fullptr-push-dup",
18 [public] uint16 echo_TestFull([in,ptr] uint32 *x, [in,ptr] uint32 *y);
21 struct ndr_push *ndr = ndr_push_init_ctx(NULL);
22 uint32_t v = 13;
23 struct echo_TestFull r;
24 r.in.x = &v;
25 r.in.y = &v;
27 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_push_echo_TestFull(ndr, NDR_IN, &r))) {
28 fprintf(stderr, "push failed\n");
29 return 1;
32 if (ndr->offset != 12) {
33 fprintf(stderr, "Offset(%d) != 12\n", ndr->offset);
34 return 2;
37 if (ndr->data[0] != ndr->data[8] ||
38 ndr->data[1] != ndr->data[9] ||
39 ndr->data[2] != ndr->data[10] ||
40 ndr->data[3] != ndr->data[11]) {
41 fprintf(stderr, "Data incorrect\n");
42 return 3;
44 ');