From 5d9ea9170d2e0fd816285bd460de05f800ce26e8 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Fri, 24 Mar 2006 12:40:07 +0000 Subject: r14690: Support represent_as in headers, enable represent_as() test (which works now) (This used to be commit 31e847a0844a6871befc6091e813ae017cd6e4b4) --- source4/pidl/tests/ndr_represent.pl | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) (limited to 'source4/pidl/tests/ndr_represent.pl') diff --git a/source4/pidl/tests/ndr_represent.pl b/source4/pidl/tests/ndr_represent.pl index e72fcf6a50..3c6b8cf6ab 100644 --- a/source4/pidl/tests/ndr_represent.pl +++ b/source4/pidl/tests/ndr_represent.pl @@ -9,12 +9,9 @@ use lib "$RealBin/../lib"; use lib "$RealBin"; use Util qw(test_samba4_ndr); -SKIP: { - skip "represent_as() is not finished yet", 8; - test_samba4_ndr('represent_as-simple', ' - void bla([in,represent_as(foo)] uint8 x); + void bla([in,represent_as(uint32)] uint8 x); ', ' uint8_t expected[] = { 0x0D }; @@ -25,25 +22,22 @@ test_samba4_ndr('represent_as-simple', if (NT_STATUS_IS_ERR(ndr_pull_bla(ndr, NDR_SCALARS|NDR_BUFFERS, &r))) return 1; - if (r != 13) + if (r.in.x != 13) return 2; ', ' #include -typedef int foo; -NTSTATUS ndr_uint8_to_foo(uint8_t from, foo *to) +NTSTATUS ndr_uint8_to_uint32(uint8_t from, uint32_t *to) { *to = from; return NT_STATUS_OK; } -NTSTATUS ndr_foo_to_uint8(foo from, uint8_t *to) +NTSTATUS ndr_uint32_to_uint8(uint32_t from, uint8_t *to) { *to = from; return NT_STATUS_OK; } ' ); - -} -- cgit